Flag Program "SCOI2015"

The meaning of problems

Given a circle and a number of sections, it is intended to cover the entire circle. For each interval, the interval is determined to be selected from at least the selected number of sections premise. To ensure that does not include the relationship between the intervals.


Thinking

We can choose to think of a range of chain (chain is the kind of a ring set a ring), then we in this chain tension is certainly the highest utilization rate, the length of the largest.

Back to the topic, we sort of left point range, and then left to find every point within the range of the furthest right point range, the process can be optimized by doubling.

Because it is a chain, so we need to times long arrays.

Code

Unsigned int tune mentality collapse.

Guess you like

Origin www.cnblogs.com/ilverene/p/11545982.html