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"
const int MAX_N = 1000;
void findRoute (int N, int a, int b)
{
int db[MAX_N], i, x = a;
for (i = 0; i < N; i++) db[i] = (i+1 == b) ? 0 : (ping(i+1, b) + 1);
while (db[x-1]) {
for (i = 0; i < N; i++)
if (db[i] == db[x-1] - 1 && ping(i+1, x) == 0) {
x = i+1;
travelTo (x);
break;
}
}
}
# | 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... |