# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
855828 | Hard_slipper | Computer Network (BOI14_network) | C++14 | 70 ms | 11856 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 "grader.cpp"
#include<bits/stdc++.h>
using namespace std;
int path[1005][1005] = {};
void findRoute (int N, int a, int b)
{
int dist = ping(a, b)+1;
for(int i =1; i <= N; i++)
{
if(i == a || i == b) continue;
int cur_dist = ping(a, i)+1;
int final_dist = ping(i, b)+1;
//cout << cur_dist << ' ' << final_dist << '\n';
if(cur_dist+final_dist == dist)
{
path[cur_dist][final_dist] = i;
}
}
path[dist][0] = b;
int cur_dist = 1;
int final_dist = dist-1;
while(cur_dist <= dist)
{
travelTo(path[cur_dist][final_dist]);
final_dist--;
cur_dist++;
}
}
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... |