10.25 last simulation competition day1 answer

Source: Internet
Author: User

Qaq is too sleepy. Let's talk about your own ideas;

In fact, this question is very easy to read wrong questions or think wrong, just like I was dumb, at first thought p + q must be equal to n ....

 

Ke... In fact, we don't need to think too much about this question. We can use these N strings to assume that they are correct or incorrect and get the correct answer;

For example, if the full score is 0, assume that the I th is incorrect and compare a [I] with other strings. If there is no opposite string, we assume that it is true; the correct answer is the opposite;

Find the smallest Lexicographic Order;

If the number is zero, you can directly find the smallest Lexicographic Order;

If the full score and zero score are not 0, we assume that a [I] is correct. We can see that there are multiple full scores and zero scores under the current hypothesis, determine whether the conditions are met;

 

10.25 last simulation competition day1 answer

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.