Problem Statement and Algorithm Description

Index10{0} pages, total6categories, approximately 852minutes read

Learning Notes: C++ Function Parameter Passing

C++ Function Parameter Passing Study Notes

C++ Function Parameter Passing Notes — Part 1: Three Methods at a Glance | Method | What's Passed | Can Modify Original? | Memory Overhead | May Be Null? | | :--- | :--- | :--- | :--- | :--- | | Pass by Value | Copy of the variable | No (modifies the copy) | High | No | | Pass by Pointer | Address of the variable | Yes (via dereference) | Low | Possible, check for... |

C++Last updated2026.12.061313characterBook4minute
High-Precision Subtraction Study Notes .md

High-Precision Subtraction Study Notes

High-Precision Subtraction Study Notes Problem Requirements Problem: High-precision subtraction, calculate a − b. Both a and b are non-negative integers not exceeding 240 digits. Input: Two non-negative integers, each on a separate line. Output: An integer representing the result of subtracting the two numbers. Sample Input: Sample Output: I. Core Concept High-precision subtraction essentially simulates column arithmetic: the numbers are too large for standard data types, so we use characters...

C++ Algorithm PrinciplesLast updated2026.11.291518characterBook4minute
High-Precision Addition Algorithm Notes.md

High-Precision Addition Algorithm Notes

High-Precision Addition (Large Integer Addition) Algorithm Notes Applicable Problem: Calculate a + b, where a and b are non-negative integers not exceeding 240 digits (too large for standard long long). I. Core Concept When numbers exceed the range of built-in integer types, they must be stored as strings. The essence of high-precision addition is simulating elementary school "vertical addition": - Align digits by place value (ones with ones, tens with tens) - Start from the ones digit...

C++ Algorithm PrinciplesLast updated2026.11.221413characterBook4minute
4 Card Game_Solution.md

4 Card Game — Solution

CSP-J 2026 Card Game (card) — Solution Summary --- I. Problem Description Problem Statement Little Z is playing a solo card game. He has a deck of n special cards, with values a₁, a₂, ..., aₙ from top to bottom. Each card's value is an integer between 1 and m, and each value appears at least once. Little Z will play n independent rounds...

CSP-J2 026 Real Exam SolutionsLast updated2026.11.116255characterBook16minute
1, Travel_travel_Solution.md

1 Travel _ Solution

[CSP-J Algorithm Intensive: Problem 2026 - Travel] I. Problem Description Xiao R and Xiao X are planning a trip by high-speed train. They purchased two second-class tickets, each displaying their respective carriage and seat numbers. They wish to sit adjacent to one another for the journey. The train consists of 17 carriages, numbered from 01 to 17. Among them, 01 and 16 ...

CSP-J2 026 Real Exam SolutionsLast updated2026.11.073602characterBook10minute
3 - In-depth Guide to Bitwise Operations and Greedy Algorithms.md

3: In-Depth Guide to Bitwise Operations and Greedy Algorithms

[CSP-J Algorithm Deep Dive: 2026 Problem 3] Bitwise Greedy Strategy: How to Select m Numbers to Maximize the Bitwise AND Result? In algorithm competitions, bitwise operations often embody a unique "brute-force aesthetics." Today, we analyze a classic bitwise greedy problem to demonstrate how to leverage binary properties to solve seemingly complex combinatorial problems in O(30n) time. 1. Problem Statement Problem Description: Given n numbers…

CSP-J2 026 Real Exam SolutionsLast updated2026.11.072120characterBook6minute
2: String Palindrome Modification Problem.md

2: String Palindrome Modification Issue

[CSP-J Algorithm Deep Dive 2026 Problem 2: String Palindrome Modification] --- I. Problem Statement Description Little R has a string S of length L, consisting only of lowercase English letters. Little R discovered that although S may be long, it can be divided into n consecutive segments, where the i-th segment (1 ≤ i ≤ n) consists of aᵢ copies of the lowercase letter cᵢ. Put...

CSP-J2 026 Real Exam SolutionsLast updated2026.11.084364characterBook11minute
BFS Shortest Path One-Pager.md

BFS Shortest Path Cheat Sheet

BFS Shortest Path · One-Page Cheat Sheet Core: Expand layer-by-layer using a queue; the first time you reach the target, you have the shortest path. Steps 1. Enqueue start node and mark as visited 2. Dequeue front node; check if it is the target 3. Explore all four directions 4. If valid, walkable, and unvisited → mark visited, record predecessor, enqueue 5. Reached target → backtrack to reconstruct path; queue empty without reaching target → no solution Reconstructing the path in three steps 1. …

C++ Algorithm PrinciplesLast updated2026.11.07626characterBook2minute
CSP Preliminary Exam Knowledge Navigation_Original Site Full Crawl.md

CSP Preliminary Exam Knowledge Navigation_ Full Site Scrape

J1 Beginner Group 💻 M1 Computer Fundamentals: History of Computing, Hardware Architecture, Operating Systems, Networking Basics, Information Security, and Competition Rules --- History of Computing Learning Objectives - Understand the four generations of computers and their key figures - Grasp the core principles of the Von Neumann architecture - Distinguish between the Turing machine model and actual computers Knowledge Points Four Generations of Computers Generation Era Core Component...

C++ Algorithm PrinciplesLast updated2026.11.07315260characterBook789minute
CSP-J1Computer Fundamentals M1.md

CSP-J1 Computer Fundamentals M1

CSP-J1 Comprehensive Course on Computer Fundamentals (M1) M1: Computer Fundamentals This module covers the history of computer development, hardware architecture, operating system basics, networking fundamentals, information security, and NOI competition rules. --- 1.1 History of Computer Development - Suggested Duration: 20 minutes - Tags: #History #Turing #VonNeumann Knowledge Explanation 1. Four Generations of Computers...

Computer BasicsLast updated2026.11.074169characterBook11minute
Yu ICP Bei 2026040576 No. -1