| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1314889 | shangbin | Computer Network (BOI14_network) | C++20 | 54 ms | 4300 KiB |
#include "network.h"
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 5;
int dist[maxn];
void findRoute(int N, int a, int b){
vector<int> spath;
for (int i = 1; i <= N; i++){
if (i != a) dist[i] = ping(a, i) + 1;
}
for (int cur_node = b; cur_node != a;){
spath.push_back(cur_node);
for (int i = 1; i <= N; i++){
if (dist[i] == dist[cur_node] - 1 && ping(cur_node, i) == 0){
cur_node = i;
break;
}
}
}
int i = spath.end() - spath.begin();
while (i--) travelTo(spath[i]);
}
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... | ||||
