CF312 Div2 CDE

Source: Internet
Author: User

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

Related Keywords:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.