# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
20821 | jjwdi0 | Computer Network (BOI14_network) | C++11 | 129 ms | 5112 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"
int A[1005];
int dist, B[1005][2];
void findRoute (int N, int a, int b) {
dist = ping(a, b);
for(int i=1; i<=N; i++) {
if(i == a || i == b) continue;
B[i][0] = ping(a, i), B[i][1] = ping(i, b);
}
for(int i=1; i<=N; i++) {
if(i == a || i == b) continue;
if(B[i][0] + B[i][1] + 1 == dist) A[B[i][0]] = i;
}
for(int i=0; i<dist; i++) travelTo(A[i]);
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... |