Simulation 107 explanations

A. characters exchange

Enumeration of a character finally arrives, then the answer is monotonic.

After the start of the enumeration of the same character, the end can be calculated.

Optimal strategy is clearly to the middle of the next character to change, so use the prefix and maintain it would be finished.

 

 

 

B. square numbers

 

 

 

 

 

 

C. multidimensional network

Guess you like

Origin www.cnblogs.com/skyh/p/11828816.html