19.7.29 NOIP simulation 10

The three words of exam questions can be directly connected into a piece: I have a spicy chicken, even the template will not play, can only kneel in front of big brother;

T1 spicy chicken

But I really spicy chicken, and finally dried T1, lack of time, even violence did not play on the desperation to pay a qj program, 60 points (rp points)

correct? No positive solution, positive solution is a big violence, $ O (n ^ 2) $ directly to my surprise, this ....... I really was too hot chicken;

So the question of violence, I am too lazy to stick the code;

 

T2 Templates

A look at the subject name, I know this question is the most difficult, there is no recourse but to leave the pit, because I have not changed over ooo, ooo ~

 

T3 Gangster

In fact, on close examination of this question ideas on positive solutions, we found that some test when I thought the bottleneck occurs, then in fact, you can think a little bit of a positive solution, then, this question on the bombing,

T3 solution to a problem where to pull a bunch of * stuff, so I do not press the question Commentary:

The total number of program is $ m ^ k $ then this number the numerator (remember the inverse) then enumerate the maximum number of points (fatigue value) calculation, (this is my exam thinking ah!) For each

The maximum value of toil, we know that the number of possible scenarios is $ i ^ k $ However, the number of which there are not legitimate program, namely $ (i-1) ^ k $ (can think about, which is good think) then

$ (I ^ k- (i- 1) ^ k) / (m ^ k) $ is the greatest probability value i exertion of time, is multiplied by a desired mapping values of w, which n-k + 1 day situation are the same (since difficulty is random, so these days are the same) then $ ans = \ sum ((i ^ k- (i-1) ^ k) / (m ^ k) * w [i] ) * (n-k + 1 ) $

Then there is this question a test point is k> n, then special judge it, you happy harvest 100 points, good results (escape)

 

T1 T3 is relatively simple, the code does not stick, T2 which have not come, the code does not touch!

Guess you like

Origin www.cnblogs.com/hzoi-lsc/p/11267551.html