Turn: how to speed up the compilation of code in ACM Competitions

Source: Internet
Author: User

From Shanghai Jiao Tong University BBS:

Fen is the foundation and the premise of everything
Above is patience
Most of the time, most people's "habits" are against "efficiency ".
Strive to give you the opportunity to fight against these habits

At the ACM competition level, writeCodeIt is not about solving the problem, but about implementing a logical process that has already been prepared in mind.
This pursuit is opposite to the habits of most people who have not been trained. To turn around this habit, the first step can be:

1. Split preparation and typing on the keyboard into two actions.
2. Split the keyboard hitting and running into two actions.
3. compilation errors happen almost always, but "try" to reduce the compilation error process and improve preparation.
Efficiency is very helpful.

WriteProgramPreparation-> code writing-> test three stages. The second stage is the minimum gap between ordinary people. Speed all
It is a staging period of "being too short to be fully inadequate or very unconstructive" and an "Endless emergence of unplanned projects ".
Bug or suffering? The debug disaster is not feasible.

If you are a member of the team, you must do the following:

1. If you press the keyboard for more than three minutes, it means you are not ready. Go to the machine and try again.
2. the compiler tells you that a variable is not declared, and you suddenly find that you do not know where to declare it. At this time, the same
It indicates that the preparation is not done well (the object and logic are all chaotic) and the machine will be confused.
3. The code written for the ACM competition does not require the debug mode.

As a rough criterion, "the probability of a sample passing" is very important. Well prepared programs,
If you cannot write the sample immediately, it must be a problem with the preparation method.

one more thing ?? If a logical error is found in the program, or the algorithm is missing, do not try again.
ding. When a job requires a patch, more or more patches are required. Many times, what you omit
is not a case, but a case or a large angle, in this case, you can only reverse the logic by re-checking the algorithm logic or
. The patch that you put on your head will only increase the burden of future errors.

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.