Hey everyone,
I used to lose rating mainly due to silly bugs in Div. 2 A–C rather than lacking algorithm knowledge. Three small habits helped me fix this:
- Test $$$N = 1$$$, $$$N = 2$$$, and all-equal arrays before submitting. Pretests often miss these edge cases, and a 20-second dry run saves a 10-minute debug penalty.
- Default to
long longfor sums and products. Even if $$$a_i \le 10^9$$$, intermediate calculations overflowinteasily. - Write a 1-line proof before coding greedy. If I can't explain in one comment line why swapping two elements doesn't improve the answer, the greedy idea is likely wrong.
Nothing groundbreaking, just simple guardrails that cleaned up my contests. What's one small habit that helped you reduce silly bugs?







