# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
495027 | uHyHn | Computer Network (BOI14_network) | C++14 | 89 ms | 8016 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 <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>=0; --i){
for(int j : at[i]){
if(!ping(u, j)){
travelTo(u = j);
break;
}
}
}
travelTo(b);
}
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... |