T1 "Keduo Li tree" "tree line"
I think of the tree line on the test, but not very good at playing intervals or different, discrete and then feel bad fight, then abandoned the idea of the tree line, and the rest did not want to get out of
The new tree Keduo Li learned a good thing
Suitable for being interpreted as segment tree, interval assignment, and random data, SET-based,
The basic idea is to sequence is divided into sections, each section is the same weights, throw set inside,
For every time you want to modify the interval, the first violent split, then the middle part of the violence erase off, create a new
Very violent, the complexity of the log, (as long as the data is not cancer), in fact, place positive solutions is available on the test I wonder, might be able to water a lot of points
T2
Greedy violence is not difficult to do, but I did not expect the examination room
Elected items divided into four, before the election is both a favorite r, if not enough to choose your favorite A and B their favorite
Then enumerate r, the remaining three cases is greedy selected minimum $ O (n ^ 2) $
Then hit the table found it to be a less rigorous single-function platform valley, people are not out of question cards, so the three points can be enumerated r
Segment tree can also be used to check the dispensed portion