Asking about counting shortest paths algorithm

Правка en2, от ldn694, 2020-12-23 20:18:29

Hello Codeforces. I have just recently joined a contest at my school. In that contest, there was a problem requiring counting the number of shortest paths from a vertex s to every other vertex in a directed weighted graph. I have implemented my idea and tested it a bit so I had a strong belief that my code was correct. In the end, it turned out that the code was wrong. The contest gave me only one submission for each problem so I didn't have a chance to fix it during the contest. I have tried to find my mistakes in the code at home but I found nothing. Here is the code similar to what I submitted during the contest.

The code

Can anyone help me point out the mistake in the code? I would be so grateful if you can provide a link to another problem that also requires counting the number of shortest paths so that I can test the code by myself. Thanks for reading and have a good day.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en5 Английский ldn694 2020-12-23 20:34:35 14
en4 Английский ldn694 2020-12-23 20:23:24 0 (published)
en3 Английский ldn694 2020-12-23 20:22:02 65
en2 Английский ldn694 2020-12-23 20:18:29 334
en1 Английский ldn694 2020-12-23 20:12:09 1619 Initial revision (saved to drafts)