()
| 94 | } |
| 95 | |
| 96 | public static long compute() { |
| 97 | dijkstra(); |
| 98 | long ans = 0; |
| 99 | for (int i = 0; i < x; i++) { |
| 100 | if (distance[i] <= h) { |
| 101 | ans += (h - distance[i]) / x + 1; |
| 102 | } |
| 103 | } |
| 104 | return ans; |
| 105 | } |
| 106 | |
| 107 | public static void main(String[] args) throws IOException { |
| 108 | Kattio io = new Kattio(); |