Блог пользователя siiikkkeeeee

Автор siiikkkeeeee, история, 3 года назад, По-английски

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 .

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
3 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

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 :)