nguyenthenam1104's blog

By nguyenthenam1104, history, 4 hours ago, In English

During a contest, wasting 40 minutes on a broken idea hurts way more than skipping a problem. These are the 3 red flags that usually tell me to drop an approach: (-) Endless casework: Every edge case you find needs a new patch instead of fitting one clean rule. (-) Forcing a data structure: You picked Segment Tree / Binary Search early, and now you're inventing ugly hacks just to make transitions work. (-) Can't explain why in one sentence: If your greedy/DP idea sounds like "maybe sort by X and hope it works" without a clear invariant, you're guessing.

When any of these happen, I test n <= 5 by hand or flip the problem (work backwards from the final state).

What's your biggest red flag that an approach won't work?

Full text and comments »

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