adyyy's blog

By adyyy, history, 5 years ago, In English

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

  • Vote: I like it
  • -17
  • Vote: I do not like it

»
5 years ago, # |
  Vote: I like it +9 Vote: I do not like it

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 years ago, # ^ |
      Vote: I like it -8 Vote: I do not like it

    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 years ago, # |
Rev. 2   Vote: I like it +12 Vote: I do not like it

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