nguyenthenam1104's blog

By nguyenthenam1104, history, 10 minutes 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?

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

»
9 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

If I find myself writing more than 100 lines for a Div2 C, I stop immediately

»
6 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

When I have to prove my greedy by saying 'trust me bro' to myself

»
6 minutes ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

if you cannot reduce your shi to a mathematical formula or two 90% of the time; your shi failing