# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
107932 | tjd229 | Computer Network (BOI14_network) | C++14 | 129 ms | 8056 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"
#include <vector>
using namespace std;
vector<int> candi[1000];
void findRoute (int N, int a, int b)
{
int len = ping(a, b);
for (int i = 1; i <= N; ++i) {
if (a == i || b == i) continue;
int d = ping(a, i);
candi[d].push_back(i);
}
for (int i = 0; i < len; ++i) {
for (auto x : candi[i]) {
if (i != 0) {
if (ping(a, x)) continue;
}
if (ping(x, b) + i + 1 == len) {
a = x;
travelTo(a);
break;
}
}
}
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... |