HDU competition (2)

Source: Internet
Author: User

The first reason is that the gap is too big. 6 questions, 7 questions, or even AK... Orz!

A: simple question. It is to simulate that process. The encoding capability is not good, so it is very slow.

B. This gbx tells me the meaning of the question, and then tries it using the brute force method, TLE. Later, I thought of the position where the records appear at most 0 consecutive points, and adjusted the sequence from this position.

C. Sorting. I directly use sort, which is very slow. Later BBM said that vector can be used.

D. I personally think it is DP. Later, gbx said that the number of Catalan would be okay if I set a formula. I said how to spend so many seconds... Alas, number theory!

More questions and more competitions. You can't just keep the status, but you need to think about how to improve your training plan and understand it in depth.Algorithm, Consolidate the review... Sdut acmer, come on!

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.