How do you people implement bugless code in one single go? In previous contest Div 2 — #564, I got WA on Div 2 C, Test case #5. After the contest, I realized that the mistake was something like:-
I often make silly mistakes while implementing something during the contest. I am able to solve Div 2 C after spending little time thinking on the problem but often end up making silly mistakes and after the contest, I regret a lot. Can you share some tips so that I can improve on avoiding silly mistakes in my code and write bugless code?