Wrong answer on spoj GOODA — good travel

Revision en2, by MostafaM.Galal, 2022-09-13 21:03:50

i condensed the graph and the value of each new node is the sum of the scc values so the graph supposed to be acyclic then i run dijkstra to find the maximum path by adding negative sign to the weights can anyone tell me what is wrong with my code here is the code https://ideone.com/VZvL6W and the link to the problem https://www.spoj.com/problems/GOODA/ Thanks in advance

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English MostafaM.Galal 2022-09-13 21:03:50 3 Tiny change: 'at is wron with my c' -> 'at is wrong with my c'
en1 English MostafaM.Galal 2022-09-13 21:02:50 413 Initial revision (published)