# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
740066 | veehz | Computer Network (BOI14_network) | C++17 | 94 ms | 7984 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "network.h"
#include <bits/stdc++.h>
using namespace std;
void findRoute(int n, int a, int b) {
vector<vector<int>> dist(n);
dist[0].push_back(b);
for(int i=1;i<=n;i++){
if(i == b) continue;
dist[ping(i,b)+1].push_back(i);
}
int cur = a, d = ping(a,b)+1;
while(d){
for(auto& i : dist[d-1]){
if(ping(cur,i) == 0){
travelTo(i);
cur = i;
d--;
break;
}
}
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |