I Come back! It's better to write a blog record.
Holiday Cheer!
CF312 (DIV2) C.AMR and chemistry
Brain hole problem
Idea: The result is that n number of simultaneous operation of the number of steps, we can record each number of changes, and record the number of occurrences, because only 1e5 of the amount of data.
Can take advantage of the characteristics of binary, such as logarithmic A1, a1<<1, A1 <<2 ... First of all the data in the range of the number of A1 larger than the Count of one, and then a1>>=1, if at this time A1 is even, only record A1 can be, if it is odd, but also need to re-larger than it all the number of records once (the record refers to the number of occurrences of an additional).
CF312 (DIV2) d.guess Your it out! Ii
Brain Hole +1
Idea: The range of all out [L, R] is converted into possible intervals, and implemented to the last layer, and the left endpoint value of each feasible interval is +1, the right endpoint value-1, so if there is a feasible interval, it must be the case
As can be seen, the feasible result must be a fourth point. So we use the idea of line scanning, from left to right can be solved.
Question E.
Data structure has been too weak, counting sort + line tree
Look at others write good: http://www.cnblogs.com/crazyacking/p/4649878.html
CF312 Div2 CDE