The successful elements have no possibilities to succeed and take advantage of the success (encountered problems or direct copying examples), only depends on diligence wisdom.
Basis (Data Structure and Algorithm Knowledge Programming Technology) Good Psychological Quality (Strong Explosive Force) Solving (Inspiration and Swinding on Sugge)
review
1, reading, supplementing knowledge
2, the question (the topic of the family is looking for "Eat Yix" topics, and get the problem to the training team to discuss)
3. Summary has been successful test questions, conduct a general topic and general correspondence algorithm, build knowledge network
Thinking process of competition analysis analysis (generally within 30 minutes)
Mechanism Analysis → Statistical Analysis (Constructed Partial Solution, Finding Mathematical Law) → Does Never Suitable Piggy Strategies → Search Creation
data structure
1, summarize (development trend: generally simply → calculate and check the relative position of the concentrated element → ?. Tree structure is generally used, and the path compression is performed)
2. Find the problem: (Hash Table (note the number of hash functions), Huffman (the access frequency of the apex), line segment tree, statistical on the binary tree (reserved intermediate point, use one-dimensional array Storage), tree array)
search for
1. Consider mathematical law and greed strategy in advance (Russia)
2, try to minimize search range (up and down and boundary conditions of cyclic variable), harsh constraints (try to use the count formula)
Dynamic programming
Deep development
1, dominant change (difficult to see the stage characteristics, difficult to determine the status and state transfer equations)
2, pay attention to recreation (Nine Dragon)
3, multi-process decision issues (multiple shortest paths)
4, dual dynamic programming (shortest path when adding M strokes)
5. For some problems with phased and state transfer characteristics, all solutions can be designated through dynamic programming.
6, the problem does not have the most desired child structure, but there is a problem of phased and state transfer characteristics, can be transformed into judgment issues through dynamic programming, and then the optimal solution
Simulation problem
1. Dramatic simulation does not hurt any conditions, carefully design data structure (rat action)
2, screening method simulation
3, structure method simulation (key is mathematical model)
Countermeasures
Pay attention to game games, what is the case of the same situation, how to avoid their repetition calculations, how to design the appropriate data structure, how to find mathematical laws from the development process
General method
L-state
Enumerally affecting all factors that affect the outcome, integrated into "state". According to the change between the time of the time, "the topology of state transfer" is constructed.
l extended rules
In some cases, you can also record the maximum (minimum) benefit of a state first (negative), described in the numerical form, and then constitute a new targeted estimate according to the corresponding conditions in the topic.
l implementation method
1 pre-processed (key)
Enumerality; constructing "Topological structure of state transfer"; dynamic planning or memory search for appearance.
1 pair of bureau strategy
Remove the state of the first hand to the other party according to the known state wins.
Specialty method
l reverse analysis
It is analyzed from the outcome or the residue, and it is not necessary to construct "Topological structure of state transition". It is not necessary to investigate all possible state and strategy, time and spatial complexity relative to the "general method".
General method:
From the top, check all the status of the speciality of the world:
At the end, research a class of balanced states
l Winning and negative rules
General method: there is a pass equalization rule
Specialty method: there is no passage and loss rules
"General Method" From a unified perspective, inspect all states to determine the strategy.
"Specialty Method" From a special angle, inspects a class of state to determine the strategy.
Geometric calculation
1, calculate triangular area and polygonal area
2, two temporal p0p1, p0p1 in common endpoint P0 (fork)
3. Determine the steering of two consecutive linkages P0P1 and P1P2 in P1 (add auxiliary line and fork)
4, determine if the two line segments intersect (cross-standing experiments and fast repellent tests), whether the two rectangles intersect (parallel to the coordinate axis), determine whether any pair of line segments in a set of line segments
5, find a bump (Graham scanning method or JARRIS step method)
6, look for the closest point
Figure 1, calculation of communication maps and communication branches, calculating a great strong connection
2. Connected, and there is no "bridge" without the direction of the "bridge", given the direction of each, so that it is a strong communication map.
3, calculate the vertex contingeging and block (network flow and depth priority search)
4, calculate the edge convergence (network flow)
5. Calculate the top color (greedy method) and the number of cores (side conversion to vertex calculation)
6, the maximum match of the two-point map (network flow or Hungarian algorithm), the right to match, the key is to transform the problem into two-fold map
7. Calculate the shortest path from all sides in the case where you are allowed to go back.