# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
45097 | nibnalin | Computer Network (BOI14_network) | C++17 | 197 ms | 14448 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 <iostream>
#include <cstdio>
#include <vector>
#include "network.h"
using namespace std;
const int maxn = int(1e3)+5;
int D[maxn];
void findRoute (int n, int a, int b)
{
for(int i = 1;i <= n;i++)
{
if(i != b) D[i] = ping(b, i)+1;
//cout << i << " " << D[0][i] << " " << D[1][i] << "\n";
}
int cur = a;
while(cur != b)
{
for(int i = 1;i <= n;i++)
{
if(D[i] == D[cur]-1 && ping(cur, i) == 0)
{
travelTo(i);
cur = i;
break;
}
}
}
}
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... |