gurnoor.codes's blog

By gurnoor.codes, history, 76 minutes ago, In English

Whenever I get a WA during a contest, my first instinct is to doubt my implementation. I start looking for bugs here and there, manually tracing the code and checking different test cases.

However, I often end up spending a significant amount of contest time debugging an implementation when the actual problem lies in my approach itself.

After the contest, when I ask AI or read the editorial, I sometimes realise that I missed a simple invariant or an important edge case. This gets quite demotivating.

I would like to understand how experienced competitive programmers handle such situations:

How do you distinguish between an implementation bug and a fundamentally incorrect approach?

How long do you spend debugging before reconsidering your approach?

How do you systematically find counterexamples?

When do you decide to abandon a problem and move on?

How did you develop this intuition over time?

I would really appreciate insights from experienced competitive programmers, especially those who faced similar difficulties during their early CP journey.

  • Vote: I like it
  • 0
  • Vote: I do not like it