Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Блог пользователя _Munna_

Автор _Munna_, история, 18 месяцев назад, По-английски

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.

  • Проголосовать: нравится
  • -14
  • Проголосовать: не нравится

»
18 месяцев назад, # |
  Проголосовать: нравится +24 Проголосовать: не нравится

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

»
18 месяцев назад, # |
  Проголосовать: нравится +15 Проголосовать: не нравится

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

rake meme

»
18 месяцев назад, # |
Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится
  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.