Reminder: in case of any technical issues, you can use the lightweight website m1.codeforces.com, m2.codeforces.com, m3.codeforces.com. ×

siiikkkeeeee's blog

By siiikkkeeeee, history, 3 years ago, In English

i am making small errors (logical + syntax ) while forming logic (mostly corner cases) and writing code .Its takes me several minutes to debug those as a result i am not able to move to solve task D in div 2 contests . Please share some ideas regarding fast debugging .

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

| Write comment?
»
3 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Hey there, fellow beast! I looked at your profile and you seem to have solved 90 odd questions in the past 20 months. If Codeforces is your primary platform for practice, the number should be much higher at the very least.

Apart from solving a lot of questions, I believe that if you wish to train your debugging skills, you could work on reading other people's codes and working with that. Check submissions for some question, find some wrong answer or TLE'd submission and try to work on correcting that. Usually, a vast majority of questions are missing some corner case or have some minor errors. Even if the submission you encounter is outrageously off-target, that's fine as well.

I haven't checked your submissions so I don't know what type of code you write, but either way, try reading optimum solutions from the editorial or from other high rated coders as well, as chances are- they have written simpler, often times idiomatic code.

Lastly, one thing that I would suggest is of utmost importance is: struggle. Do Not Look At The Failed Test Cases. Try to struggle some more if possible. Reading the editorial can be pushed for later as well if you believe you've got some idea of the solution.

Happy Coding :)