51Nod Algorithm Marathon 23 open Black Kee

Source: Internet
Author: User

What a tragedy. Although the open half a day black, but still be dalao step on ...

The second time black, or was stuck in the rank20, I am good food ah ... = =

Write a race pass ...

See the problem after the habit of open, a~d seems to have no idea, F should be Tao number theory, see e feeling a little meaning, a look at the data range, why only $50000$, and then carefully look at the formula, manual sub-situation after discussion to get a conclusion--

This is the water segment tree Maintenance mo Team AH =

Then began code code, because some of the brain remnant error adjusted for a while, and then got the result:

I firmly believe that the complexity of my team is right, and then start all kinds of Wang Yisong cards Often, the use of common skills include:

Open O3 and Always_inline

Faster Read and Write

Add discretization ( This is not a basic accomplishment. )

Write four arrays of the segment tree into a struct

The function is expanded manually (the effect is still very good.)

Use variables to store frequently accessed array elements (that is, to save the queried endpoint with a variable.

The above card often plus after still tle, think of Kathang when Ztc told me can use a tree-like array, changed to a tree-like array, this time finally (run pretty fast ...).

(later thought, as long as the line tree two times sum to a sum and then the total reduction will be able to cut the length of the tree segment half of the time, can also card past ...)

While I was tuning the team, ZTC out the B's Pass ($\frac{n (n-1)}{2m}$), and then he shouted at the little friends, and the moment was blown by everyone ...

Then the room's small partners have been cheat a problem, in my first e-question before the next lrz put a problem cheat off, and then he gave me a copy of the code ... (why 51Nod requires no less than 15 sets of data

At the same time LRD has been writing D's DP, the next day to get past (although he said the theoretical complexity of $5$ billion ...), and then gave me a copy, so cut off four questions, but did not seem to the top 10 ...

Before 8:00 Lyc again out C, but the F question did not have too many ideas, and then the exam ...

Before the exam on the list there are three not AK, but the test is definitely not a chance, really heart stuffed ...

(I don't want to say I pushed F's formula for a whole morning ...)

Later, after the test to make F, the introduction of the same as the formula, but there is a thing is the sum of the number of $k$ times, the feeling can not be counted, temporarily abandoned therapy.

(I can't finish it ... To be continued)

51Nod Algorithm Marathon 23 open Black Kee

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.