# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
161865 | AQT | Computer Network (BOI14_network) | C++14 | 0 ms | 0 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>
#include "network.h"
using namespace std;
vector<int> dist[1005];
void findRoute(int N, int A, int B){
int D = ping(A, B)+1;
for(int n = 1; n<=N; n++){
if(n != A && n != B){
int k = ping(A, B);
dist[k+1].push_back(n);
}
}
int crnt = A;
for(int d = D-1; d; d--){
for(int n : dist[d]){
if(ping(crnt, n) == 0){
crnt = n;
travelTo(n);
break;
}
}
}
travelTo(B);
}
int main(){
}