| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 31382 | imaxblue | 컴퓨터 네트워크 (BOI14_network) | C++14 | 156 ms | 5180 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<vector>
#include<algorithm>
using namespace std;
#define pb push_back
int d[1005], t, n;
vector<int> v[1005], ans;
int get(int i, int j){
    if (i==j) return 0;
    return ping(i, j)+1;
}
void findRoute (int N, int a, int b){
    for (int l=1; l<=N; ++l){
        v[d[l]=get(a, l)].pb(l);
    }
    n=N;
    while(b!=a){
        for(auto i:v[d[b]-1]){
            if (get(b, i)==1){
                ans.pb(b);
                b=i;
                break;
            }
        }
    }
    reverse(ans.begin(), ans.end());
    for (int l=0; l<ans.size(); ++l){
        travelTo(ans[l]);
    }
}
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... | ||||
