| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1314800 | mantaggez | Computer Network (BOI14_network) | C++20 | 53 ms | 4344 KiB |
#include "network.h"
#include <bits/stdc++.h>
using namespace std;
void findRoute (int N, int a, int b)
{
int dist = ping(a, b), prev = a;
vector<int> tob(N + 1, -1), vs(N + 1, 0);
for(int i=0;i<=dist;i++)
{
for(int j=1;j<=N;j++)
{
if(vs[j]) continue;
if(tob[j] == -1 && j != b) tob[j] = ping(j, b);
if(tob[j] == dist - i - 1 && ping(prev, j) == 0)
{
travelTo(j);
vs[j] = 1;
prev = j;
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... | ||||
