ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1210. Kind Spirits

Give me some tests
Posted by Duzhy Igor 6 Oct 2006 21:59
I think that my program is correct, but i don't understand why i have WA#5. I use Dejkstra algorithm. Please, give me some right tests. Than I use another method - DP. I use 2 arrays for the current and previous states, but I have WA#7. Help!!! Thanks.

Edited by author 06.10.2006 22:31

Edited by author 06.10.2006 22:31

Edited by author 06.10.2006 22:31
Re: Give me some tests
Posted by unlucky [Vologda SPU] 6 Nov 2009 03:09
As i know - Dejkstra dosn't work for graph with negative weight of edge.
Re: Give me some tests
Posted by Iosif inf-10 31 Dec 2009 23:43
3
2
1 15 0
1 5 0
*
4
1 -5 2 10 0
1 3 0
2 40 0
0
*
3
1 1 2 5 3 -5 0
2 -19 3 -20 0
4 -100 0

Answer is -1