gautrang2474165's blog

By gautrang2474165, history, 16 minutes ago, In English

During contests or upsolving, I keep running into the same issue: as soon as I spot a greedy or DP transition that looks somewhat plausible, I immediately start implementing it without properly verifying the logic. Most of the time, I either get stuck mid-way because the states become too messy, or I submit and get hit with WA on some basic edge cases I completely overlooked. Even worse, sometimes I misjudge the constraints and only realize after writing 100 lines that my complexity won't pass the time limit. Lately, I've been trying to break this habit by writing a quick brute force to stress-test small cases or double-checking the invariants on paper before touching my IDE.

What are some clear signs or "red flags" that tell you an approach is a dead end before you spend too much time implementing it?

  • Vote: I like it
  • +1
  • Vote: I do not like it