What are your tips to implement bugless code in one single shot?

Revision en1, by NotGivingUp, 2019-06-07 21:50:57

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?

Tags bugless_code, silly, mistakes, ac

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English NotGivingUp 2019-06-07 21:51:44 0 (published)
en1 English NotGivingUp 2019-06-07 21:50:57 684 Initial revision (saved to drafts)