Ah (inexplicable sigh) ......
I wrote a blog this morning went to eat, but queuing to the door, but today even free breakfast eh, happy ~~
Back test, up anal T1, eh eh-half answer (perfect positive solution to miss), then goose yards an hour (and compile wits), and finally emphasized the sample
Look T3, does not want the 30min, forget to fight violence, the code finished suddenly want to check T1, back and saw that crazy RE, and vector wits and, ultimately, the good results Wa20
Left 30min, look at T3, will not fight violence thrown up, and the rest spent 10min in check
Total 20 + 20 + 50 = 90, rank10, or poor ah
keep it up
T1:Star Way To Heaven
This problem look very much like a half, and then half of the length Check disjoint-set, so that the complexity of a K 2 logK (although can live)
Careful study, we found that the requirements is from the upper boundary to the lower boundary of the shortest path to all of the largest side / 2
Minimum spanning tree can be used, but only with prim, because kruskal complexity mlogm, and m is n ^ 2 level
T2:God Knows
Segment tree maintenance monotonous stack of board title
T3:Lost My Music
%%%exface
The title persimmon turn into a slope found in the form of a stack we need to maintain a monotonous convex hull under
However, if the lamp again elastic restoring force, then the complexity of the card to be n ^ 2
We can maintain monotonous stack with double the idea of recording each point ^ k generation ancestor in their stack 2 like
You can also use heuristic tree merger idea
For mild violence son popped + recovery, can guarantee that the complexity of the