T1 Union
Exam two hours and finally transferred over, saying a sucker wrong in the end still found wrong .....
Probably maintain two lazy markers, covering a range, or a range of different, then there is a will to ensure that each section labeled lazy.
Then the number of maintenance intervals of 0, zero queries there can query.
General board problems determining the correct ideas, as static troubleshooting
T2 Race
The examination room to play 50 minutes of violence
In fact, 70 minutes approach is very simple, both like to enumerate the number is r, A favorite also choose Ak, B election Bk, and then select the rest, greedy election on the line
Correct answer is tree line, but I did not play, three wrong answers, but the water before.
T3 title
Fairy DPbitset optimization
f [i] [S] i represents the point of survival, S must be set survival
So consider Backward
Suppose the current at both ends of the edge points a, b, if the f [i] [a] == 1 && f [i] [b] == 1 then must eat a show at a later point, b at a time to eat a certain, show illegal
If only one == 1, you have to eat another
If you are == 0, indicating that whoever eat, nothing to do with i
So long as the two points is determined whether the set intersection exists
A point can only be eaten once, he can only contribute to a point
If the intersection show that there is not