# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
445364 | wind_reaper | Computer Network (BOI14_network) | C++17 | 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;
int _ping(int u, int v){
return (u == v ? -1 : ping(i, j));
}
void findRoute(int N, int u, int v){
int dist[N + 1];
for(int i = 1; i <= N; i++)
dist[i] = _ping(v, i);
int cur = u;
for(int i = dist[u] - 1; i >= 0; --i)
for(int j = 1; j <= N; j++){
if(dist[j] == i && ping(cur, i) == 0){
travelTo(i);
cur = i;
}
}
}