# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1007348 | Ludissey | Computer Network (BOI14_network) | C++14 | 76 ms | 11708 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 <bits/stdc++.h>
#define sz(a) (int)a.size()
#define all(a) a.begin(), a.end()
using namespace std;
void findRoute (int N, int a, int b)
{
int d=ping(a,b);
vector<vector<int>> prox(d);
for (int i = 1; i <= N; i++) {
if(i!=a&&i!=b) {
prox[ping(i,b)].push_back(i);
}
}
int x=a;
for (int i = d-1; i >= 0; i--){
for (auto u : prox[i])
{
if(ping(x,u)==0) { x=u; travelTo(x); 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... |