In recent brush the topic of the provinces OI2019
Feeling to write something similar guided. . . . Only brief explanations
1.ZJOI2019
1.1 mahjong
blog
This year's theme mahjong really more listed first dp formula, the state rarely found, consider the assignment with a map to each state
For seeking \ (E (X) \) , may be calculated first \ (\ NUM SUM (X) \) , where \ (num (x) \) represents a value greater than or equal \ (X \) Number of cases
1.2 segment tree
blog
Regarded as a more distinctive title
\ (F_X \) represents \ (X \) No. segment tree nodes marked proportion
\ (g_x \) represents \ (X \) number to the root node path segment tree marked proportion
The properties of the modified segment tree sections, transferred
1.3minmax search
blog
You may wish to find the answer and prefixes
First discovered let \ (W \) values larger or smaller node you want to change is no post
Were obtained allows \ (W \) probability becomes smaller in Japan, (in order to facilitate the calculation), calculated not let \ (W \) becomes larger and allows \ (W \) the probability is small, so that two metastasis is the same
Found \ (R \) for each additional \ (1 \) , there will only be two leaf nodes are changed, so the use of the idea of ddp
Switch 1.4
blog
I will not generating function, ah, Come Help me
Is such that:
First, first find the probability of reaching the target state and repeatable return to the original state of \ (EGF \) , which was converted to \ (OGF \)
Then the division is to be the answer \ (OGF \) , the derivative can get an answer, but the derivation so hard ah. . .
1.5 Language
blog
It corresponds to obtaining for each point, after the size of a virtual tree endpoint all its chains (chains and is apparently a tree)
Before seeking to add a virtual tree root node, the tree difference, and the endpoints endpoint \ (LCA \) for add and delete father point operation, the segment tree merge