Hello Everyone, Can you tell me what are the common mistakes you have done in your competitive programming journey? I am new in competitive programming. Give me some suggestion as a beginner so that I can avoid those mistake.
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3839 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3612 |
7 | Geothermal | 3569 |
7 | cnnfls_csy | 3569 |
9 | ecnerwala | 3494 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | Um_nik | 164 |
2 | maomao90 | 160 |
3 | -is-this-fft- | 159 |
4 | atcoder_official | 158 |
4 | awoo | 158 |
4 | cry | 158 |
7 | adamant | 155 |
8 | nor | 154 |
9 | TheScrasse | 151 |
9 | maroonrk | 151 |
Hello Everyone, Can you tell me what are the common mistakes you have done in your competitive programming journey? I am new in competitive programming. Give me some suggestion as a beginner so that I can avoid those mistake.
Name |
---|
Just participate in contests, and you will experience all the common mistakes.
The part not shown in image is "learning from it and becoming better".
Floating point: forget setprecision(15), forget long double. We should use integer arithmetic as much as possible.
Mix up indices $$$i, j$$$, especially when you are copying code.
Wrong $$$l, r$$$ in binary search. For example, you set the lower bound to $$$0$$$ while it should be $$$1$$$.
Misread problems and omit conditions.
Set too small arrays, especially when you use FFT or segment tree.
Use std::set/std::map when the time limit is too tight. Try using arrays. Also when the time limit is tight, don't use PyPy/Python.
Wrong greedy strategies, I often get into this.
Overflow.
Restrict yourself to one idea. If you are stuck at one idea and make no progress, switch to another idea or another problem.
Be too anxious when the competition is going to finish, cannot calm down.
thanks grandpa
grandma please.