# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
448568 | 2021-07-30T19:21:15 Z | Aryan_Raina | Computer Network (BOI14_network) | C++17 | 99 ms | 4408 KB |
#include "network.h" #include <bits/stdc++.h> using namespace std; void findRoute (int N, int a, int b) { int da[N+1], db[N+1]; for (int i = 1; i <= N; i++) if (a != i) da[i] = ping(a, i); for (int i = 1; i <= N; i++) if (b != i) db[i] = ping(b, i); da[a] = db[b] = -1; int cur = a; while (cur != b) for (int i = 1; i <= N; i++) if (da[i] == da[cur]+1 && da[i]+db[i]+1 == da[b]) travelTo(cur = i); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 97 ms | 4212 KB | Output is correct |
2 | Correct | 99 ms | 4192 KB | Output is correct |
3 | Correct | 93 ms | 4188 KB | Output is correct |
4 | Correct | 95 ms | 4224 KB | Output is correct |
5 | Correct | 93 ms | 4176 KB | Output is correct |
6 | Correct | 97 ms | 4408 KB | Output is correct |
7 | Correct | 0 ms | 204 KB | Output is correct |
8 | Correct | 0 ms | 332 KB | Output is correct |
9 | Correct | 0 ms | 204 KB | Output is correct |
10 | Correct | 1 ms | 332 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 93 ms | 4172 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 94 ms | 4288 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 94 ms | 4152 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |