Introduction
I bought books a long time ago. They are similar to other competition books. For competitions, there should be a lot of small mistakes, and the scope is quite wide, mainly data structures (and query sets, line segment trees, graph theory, etc ),AlgorithmDesign method (divide, greedy, etc.), there are several chapters about DP, followed by ten sets of simulation questions
Complete the study of other parts except the simulation questions before the Spring Festival
Chapter 1 Space-Time Analysis
After reading introduction to algorithms, data structure and algorithm analysis, and in-depth understanding of computer systems, this analysis cannot be called analysis. This is the characteristic of the Competition Teaching Materials: the lecture is simple and not rigorous, but it is easy to get started with because it is completely competition-oriented.
I gave the most example of a minimal spanning tree question, but I am confused about the data: Number of vertices <= 100000, number of edges <= 60000, the number of edges must at least be connected by a N-1 ......
There is also a number of p and q that satisfies the condition that X is the maximum common divisor and Y is the least common multiple. The enumeration algorithm is used to provide two simple optimization examples, however, I seem to have better practices:
P and q take X as the maximum common divisor, and Y as the minimum public multiple, P = NX, q = Mx, Mn = Q/P, obtain A1 ^ K1 * A2 * K2 by factorization Q/P ......, There are (K1 + 1) (k2 + 1 )...... To verify the correctness.
I will talk about the space complexity later, that is, don't blow up the memory. There's nothing to do. Wait and read the csapp to see what the stack is like.
Summary
WriteProgramAttention should be paid to the growth level and optimization of the gradual time, constant optimization should also be taken into account, and the test should not blow out the memory
None of the above
The second chapter of "data structure and algorithm analysis" is quite well written ...... The example is better, as is the competition book