Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
I too hard
Game ideas
- T1: Because obviously you n n side, so n 2 enumeration wave, then the answer is found to contribute to a continuous range segment and, like twice the difference.
- T2: Random Walk? ? ? Shoved a wave of random walk formula relies entirely on yy, correctness apparently did not, so I did not play. Then found that the direct Gaussian elimination 60 minutes.
- T3: meaning of the questions did not understand. . .
After the game digestion
- T1 open a small array of gg.
- T2 at constant optimization on the n- 3 water passed (without a dream I do not deserve to get more than 40 points). From the leaves up backwards like Gaussian elimination, because i disappear with the j, i have no son, leaving only the position of the father and grandfather has a value of i on the i-related, and j of the two positions there is also a certain value, so when the father does not eliminate some more position changes from 0 to something else. Time complexity and accuracy can be guaranteed.
- In fact there nlogn T2 practice.
- T3, is actually seeking a maximum of d, such that
Then suppose , to such
found that this is a monotonically decreasing function because if d becomes large, the increment is smaller than the latter in front.
Binary integer before looking for zero maintenance and use Fenwick tree can be found.
And then a solution of the equation just fine.
to sum up
- Be sure to check the size of the array.
- Observe the nature of the subject, the desired title Gaussian elimination really is the most conventional way of routine.
- T3 except that Italy is a water problem. . . But I was wrong character tone for two days. . . Mentality collapse.