# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
752889 | 125259 | Computer Network (BOI14_network) | C++17 | 83 ms | 7848 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){
int arr[n+1],arr1[n+1];
for(int i=1; i<=n; i++){
if(i==a or i==b) continue;
arr[i]=ping(a,i);
arr1[i]=ping(b,i);
}
int dist=ping(a,b);
for(int i=0; i<dist; i++){
for(int j=1; j<=n; j++){
if(j==a or j==b)continue;
if(arr[j]==i and arr1[j]==dist-1-i) travelTo(j);
}
}
travelTo(b);
/*int dist = ping(a, b);
for (int i = 1; i <= dist; ++i)
travelTo (i);*/
}
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... |