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>
using namespace std;
const int MX = 1005;
int ans[MX];
void findRoute (int N, int a, int b)
{
int D = ping(a, b) + 1;
ans[0] = a, ans[D] = b;
for (int i = 1; i <= N; i++){
if (i == a || i == b) continue;
int x = ping(a, i) + 1, y = ping(i, b) + 1;
if (x + y == D) ans[x] = i;
}
for (int i = 1; i <= D; i++) travelTo(ans[i]);
}
# | 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... |