noip simulation [20171103]

T1

[dp]

For the first time the sort key.

F [i] represents the t [i] time, and try to intercept the corresponding bullets stopped up to several rounds of ammunition, in the case itself is not dead. If the transfer back, the number of bullets in front of a plurality of points can block are the same, then select one of the most time on.

Note that some bullets could not intercept, so the initial value assigned to minimum.

If (D (i, j) <= t [j] -t [i] / * can select * / || (m1 - (t [i] -f [i]) * d) <0 / * must be selected * /) f [i] = max (f [i], f [j] + 1);

And in the case of death is not the way, as far as possible by the choice, take the max.

 

T2

[Mathematical, half]

For each time x [i], X0 to take x [i] takes the individual contributions to the minimum value, into a single increase or decrease when a non-single x [i], the image is similar to a function of a quadratic function y = a * x ^ 2. Guiding function by which a single, easy to know for each of the x [i] in terms of, by X0 are single real number range. Then we can for two minutes x0, each guide add compare function to determine the smallest contribution to take x0.

 

T3

[Disjoint-set]

Like the fort into a strong and centralized check, and check if there are more than fort fort strong centralized, and check the focus of the fort all feasible. After the search and then determine the number of viable Saowan set fort.

 

Guess you like

Origin www.cnblogs.com/ve-2021/p/11353928.html