# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
574114 | imsifile | Computer Network (BOI14_network) | C++17 | 0 ms | 0 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 dd[1010];
void findRoute(int N, int a, int b)
{
for (int i = 1; i <= N; i++)
dd[i] = ping(i, b);
int pv = a;
for (int i = 1; i <= N; i++)
{
for (int j = 1; j <= N; j++)
{
if (dd[pv] != dd[j] + 1)
continue;
if (ping(pv, j) == 1)
{
travleTo(j);
pv = j;
break;
}
}
if (pv == b)
break;
}
}