# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
392342 | 2021-04-20T20:06:43 Z | ritul_kr_singh | Computer Network (BOI14_network) | C++17 | 105 ms | 4332 KB |
#include <bits/stdc++.h> using namespace std; #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(b, i); if(k < dist) at[k].push_back(i); } int u = a; for(int i=dist-1; i; --i){ for(int j : at[i]){ if(!ping(u, j)){ travelTo(u = j); break; } } } travelTo(b); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 105 ms | 4292 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 100 ms | 4280 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 100 ms | 4332 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 99 ms | 4292 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |