Codeforces Round #614 (Div. 2) Postmortem
What went well
- A was a fast 3-minute problem.
- B was easy and I solved it decently quickly in 9 minutes.
What went wrong
- C took way too long to code, mainly because I didn't have a good representation on blocking either diagonal path. Turns out that if cell (r, c) is blocked, then I just needed to check (1-r, c-1), (1-r, c), and (1-r, c+1). Furthermore, if I used a 2x(N+2) grid instead of 2xN grid, then I wouldn't have to do any bounds checking because the (*, -1) and (*, N) cells could never be set.
Where I got lucky
- I didn't do so terribly so as to get demoted to green.
No comments:
Post a Comment