"Solution to a problem" NOIP simulation test solution to a problem scrawl II (36)

After all, test too frequently so impossible to write every test solution to a problem. (I explain what kind of strength ah but no one was looking)

Some topics are not even get rid of. Ran summary written explanations on the one hand, on the other hand is relaxed.

NOIP simulation tests 36


T1 characters

This question I was completely ignorant of the force. It is to teach us to play a little violence and high complexity of the analysis? ?

However Violence away, the complexity of the analysis did not get to. The harmonic series is what? ?

Degree of your mother:

Harmonic Series (English: Harmonic series) is a divergence of infinite series. Harmonic harmonic series is obtained by adding the number of columns and each element. Late Middle Ages mathematician Oresme proved that all the harmonic series is divergent to the infinite. However, the presence of the harmonic series of Ramanujan gold, and is Euler's constant. ......

Series is what? ? Ramanujan gold is what? ? Look ignorant force.

But violent play give me a lesson. This question is not that of violence, how smart play, just tell me not get into a dead end.

I began to think that the enumeration loop section of length $ len $, then determine the position of a loop section before $ len $ numbers have been filled, $ m $ known location check based on.

Then I do not find this. Because I need to enumerate the upper and lower bound, but also to reconcile what is the number of individual numbers within the range of $ len $. So very sad.

Then always wanted always wanted always wanted. . . .

Later, Larry told me directly $ m $ known positions and enumeration of $ len $ determine the cycle and then greedy festival like ...... ......

It is worth mentioning that a persimmon, when the race once I do not like: $ (i-1)% len + 1 $ mod directly if integer multiple of $ len $ of $ bug $ occurs.

Thus the $ -1 $, $ mod $ $ + 1 $. Perfect solution.

T2 cake

Template interval dp? ? However, too much water did not play long before the interval dp plus. . .

T3 Game

I did not understand the meaning of problems ...... always thought that all move together Li Lulu. Under optimal circumstances later found Li Lulu certainly can not all move together ah ......

Li Lulu's consider four operations: Pick up Yuki, Yuki down, throw Yuki, holding Yuki fly.

I found no use to pick up and put down, at best, for a Li Lulu to pick him up.

Consider the state of Qi: one is thrown out of the state, one is Li Lulu is holding flying status.

And because the state can not be thrown in the corner, they were thrown out of the state is divided into two types: sideways fly and fly vertically.

So consider the split point. Each point is split into the three: flying sideways state, fly vertically state, the holding state Lulu Li.

Consider how the construction side:

For each point: Status 1 is Li Lulu holding , fly sideways reset state 2, state 3 to fly vertically.

For state 1: Li Lulu can hold up to the left by the right down fly weights are C.

You can also choose to let Yuki place thrown into the "flight" state (funny), B can be settled here. Then a weight of B.

For state 2: You can continue to fly to the left, you can continue to fly to the right, you can choose to land at this point.

Continue to fly weights are A, but landed this point there is no need to consider Li Lulu. With or without that we can as a call to a recent Li Lulu came to pick her up.

So consider preprocessing spent every point over the recent Li Lulu needed.

Multi-source pre-bfs consideration. However, some students said: Li Lulu will move ah.

Indeed move, but we found that by careful consideration, if Li Lulu No. 1 by some kind of deal will be handed over to Li Qi Lulu No. 2, and then handed over to Li Li Lulu Lulu No. 1 by the number 2, this is certainly not excellent.

So every Li Lulu only after another Yuki. So down the pretreatment Recent Li Lulu needed to catch up on the weights correctly.

State 3 Ibid.

After the construction side running while no brain dijkstra optimization heap on the line.

Sahua end.

Guess you like

Origin www.cnblogs.com/xingmi-weiyouni/p/11468381.html