CCF was established in 1962
NOI was first held in 1984
It was first held in 1995 noip
2019 CSP was first held non-professional group
Preamble, in sequence, after traversal: first current access node, or access in the middle, or last visit
DFS is the preorder traversal sequence
Huffman coding: Huffman coding, the main purpose is to maximize the frequency of use save character (code) of the storage space.
https://blog.csdn.net/qq_36653505/article/details/81701181
example:
[TG2011]
Existing classical period, to be compressed by a binary Huffman coding. For simplicity, this is assumed only by a classical four characters "and", "Down", "who", "also" composition, the number of times they appear 700,600,300,400, respectively. Then, "but also" coded word length may be ().
There are two modes: 300 + 400, to give 700, 600 and then spliced to give 1300, and then splicing the original 700, a length of 3
If the first splice 600 and 700, then the length of only 2
Catalan Numbers
Setting h (n) is n + 1, the number of items of catalan, so that h (0) = 1, h (1) = 1, catalan a number satisfying the recurrence formula: h (n) = H (0) H (N- . 1) H + (. 1) H (2-n-) + ... + H (. 1-n-) * H (0) (n-> = 2)
There are h (n) = C (2n, n) / (n + 1)
https://blog.csdn.net/wookaikaiko/article/details/81105031
Cantor Expand (applied full array)
Formula: set a full permutation of {a1, a2, ... an}
则rank=a1(n-1)!+a2(n-2)!+...+an*1
Cantor Expand inverse: inverse use,
For the first rank, we first divided by (n-1) !, then a few suppliers that is already lined up several
After dividing the remainder by the number (n-2) !, so
https://blog.csdn.net/ajaxlt/article/details/86544074
The time complexity of computing finishing:
https://www.luogu.org/discuss/show/155153?page=2
OrzOrzOrz
P class problems && NP type of problem && NPC type of problem class && NP hard problem
P class of problems: there exists a polynomial time complexity issues Solution
Class NP problem: to verify in polynomial time complexity of a solution of the question whether a correct solution (P type, problem class NP its subset)
NPC class issue: probably the only title search, can be converted in polynomial time NP class problem, but there is no problem in polynomial time complexity of the solution
Hard class NP problem: it can be converted in polynomial time NP kind of problem, but the problem is not necessarily NP (NP type of problem for which subset)