"2019.8.10 exam" Desperate greedy

T1 gods greedy, I played for a long time can only write 70 minutes of pure violence, hanging badly, T2 violence write hung up, burst a 0, T3, then took public of 30 points.

Nothing more to say this time, directly on the solution of the problem.

 

T1: direct greedy, the more by the stone after the go, like this with a queue maintains about m frogs, continue to expand with stones.

 

T2: the title segment tree board, about the number of layers to maintain the right to delete deleted after the son of the current finished he still without deleted, their number of layers, the rest of their true height, when combined with the right to delete left his son to son , write cal functions, maintenance was deleted son left his son the right number.

Such complexity is $ (nlog ^ 2n) O $ of

 

T3: Cross linked list, the linked list is directly put on a two-dimensional, recording header 0 and n + 1, the position and orientation of certain points determined by the table head, that side can be determined that the steering, so that walking along the boundary, cut some point to another on the mend.

Broadly speaking, or analog, is a thinking problem, it seems recently to do all this thinking problem, no knowledge on what the tall, can abuse you completely, I might still thinking problems brush too little, what when thinking out of practice is the real practice out, thinking more useful than what anencephaly data structure.

 

$Mind\ Dancer$

Guess you like

Origin www.cnblogs.com/Lrefrain/p/11333779.html