# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
392334 | 2021-04-20T19:58:34 Z | ritul_kr_singh | Computer Network (BOI14_network) | C++17 | 139 ms | 8028 KB |
#include <bits/stdc++.h> using namespace std; // #define int long long #define sp << ' ' << #define nl << '\n' #include "network.h" void findRoute (int N, int a, int b){ int dist = ping(a, b); vector<int> at[dist]; for(int i=1; i<=N; ++i){ if(i == a or i == b) continue; int k = ping(a, i); if(k < dist) at[k].push_back(i); } for(int i=0; i<dist; ++i){ for(int j : at[i]){ if(i + 1 + ping(j, b) == dist){ travelTo(j); break; } } } travelTo(b); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 135 ms | 8028 KB | Output is correct |
2 | Correct | 113 ms | 7356 KB | Output is correct |
3 | Correct | 123 ms | 6936 KB | Output is correct |
4 | Correct | 139 ms | 6960 KB | Output is correct |
5 | Correct | 121 ms | 6612 KB | Output is correct |
6 | Correct | 110 ms | 6724 KB | Output is correct |
7 | Correct | 1 ms | 204 KB | Output is correct |
8 | Correct | 1 ms | 304 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 1 ms | 332 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 121 ms | 6652 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 116 ms | 6596 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 113 ms | 6628 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |