raghav_19's blog

By raghav_19, history, 3 months ago, In English,

Hello, For this Problem i made this submission during contest but it failed system test on only one case with error(uncaught exception with no output). test case is same as i am providing in my main function. when i run on my local machine, ideone, etc it was printing correct answer.

later i made this submission and it passed system test. Only change i made in second submission is i changed vis array from int to bool and it got accepted.

I was applying dijkstra algorithm as N<=5e6 and each node have atmost 2 edges so it should run in 1-2 sec (since it does not require to create adjacency list so i was just using distance & visit array with priority queue) and time limit for problem was 3 sec. So TLE shouldn't be case (If TLE is case then how would it got accepted by changing data type of vis array).

What could be the reason behind this unusual behaviour. Please Help

Many coders fail system test in this problem. Was your reason is similar to this?

 
 
 
 
  • Vote: I like it
  • +8
  • Vote: I do not like it

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by raghav_19 (previous revision, new revision, compare).