Please read the new rule regarding the restriction on the use of AI tools. ×

_Munna_'s blog

By _Munna_, history, 18 months ago, In English

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.

  • Vote: I like it
  • -14
  • Vote: I do not like it

| Write comment?
»
18 months ago, # |
  Vote: I like it +24 Vote: I do not like it

Just participate in contests, and you will experience all the common mistakes.

»
18 months ago, # |
  Vote: I like it +15 Vote: I do not like it

The part not shown in image is "learning from it and becoming better".

rake meme

»
18 months ago, # |
Rev. 2   Vote: I like it +5 Vote: I do not like it
  1. Floating point: forget setprecision(15), forget long double. We should use integer arithmetic as much as possible.

  2. Mix up indices $$$i, j$$$, especially when you are copying code.

  3. Wrong $$$l, r$$$ in binary search. For example, you set the lower bound to $$$0$$$ while it should be $$$1$$$.

  4. Misread problems and omit conditions.

  5. Set too small arrays, especially when you use FFT or segment tree.

  6. 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.

  7. Wrong greedy strategies, I often get into this.

  8. Overflow.

  9. Restrict yourself to one idea. If you are stuck at one idea and make no progress, switch to another idea or another problem.

  10. Be too anxious when the competition is going to finish, cannot calm down.