Google APAC Round B — Travel

Правка en1, от Death_Scythe, 2015-09-20 12:35:48

Hello all! I was trying to solve this problem from the recent APAC contest: https://code.google.com/codejam/contest/10214486/dashboard

I think this problem can be solved by dijkstra's shortest path algorithm. I precompute the minimum time taken from the source for every value of S so that the queries can be answered in constant time.

Here's my code: http://ideone.com/cle94b

I don't see why I am getting a WA.

Any help is appreciated. Thanks!

Теги graph, c++, dijkstra, google code jam

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Death_Scythe 2015-09-20 12:35:48 485 Initial revision (published)