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

Автор adyyy, история, 5 лет назад, По-английски

hi can anybody please check out my solution for problem (https://mirror.codeforces.com/contest/20/problem/C)

.... my code... i am consistently getting WA at test 33.... https://mirror.codeforces.com/contest/20/submission/70403794

THanks and sorry for my poor english

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

»
5 лет назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

For the submission it was a runtime error instead of wrong answer. Another suggestion is to make sure you indent is consistent for both you and others to figure out your code :)

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится -8 Проголосовать: не нравится

    M sorry for my poor code ...... But ya I have already read many basic djikstras code of others and olmost everything is same .... But still cant figure out what's wrong.....

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

I fixed your code in few changes (You can compare with you submission to check it out)

https://mirror.codeforces.com/contest/20/submission/70406882

You dereference the pointer erased from the set which will cause a runtime error.

Another suggestion is to refer to this post: https://mirror.codeforces.com/blog/entry/15547

To catch you runtime error locally :)