# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1007350 | 2024-06-24T16:37:56 Z | Ludissey | Computer Network (BOI14_network) | C++14 | 71 ms | 8020 KB |
#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); map<int,vector<int>> prox; 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
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 57 ms | 4448 KB | Output is correct |
2 | Correct | 51 ms | 4176 KB | Output is correct |
3 | Correct | 52 ms | 7164 KB | Output is correct |
4 | Correct | 48 ms | 6992 KB | Output is correct |
5 | Correct | 50 ms | 6740 KB | Output is correct |
6 | Correct | 71 ms | 6604 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 0 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 50 ms | 4172 KB | Output is correct |
2 | Correct | 12 ms | 3164 KB | Output is correct |
3 | Correct | 54 ms | 7760 KB | Output is correct |
4 | Correct | 43 ms | 6228 KB | Output is correct |
5 | Correct | 62 ms | 7980 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 50 ms | 4180 KB | Output is correct |
2 | Correct | 13 ms | 3164 KB | Output is correct |
3 | Correct | 54 ms | 8020 KB | Output is correct |
4 | Correct | 44 ms | 6228 KB | Output is correct |
5 | Correct | 52 ms | 8020 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 51 ms | 4176 KB | Output is correct |
2 | Correct | 12 ms | 3184 KB | Output is correct |
3 | Correct | 55 ms | 7888 KB | Output is correct |
4 | Correct | 42 ms | 6228 KB | Output is correct |
5 | Correct | 49 ms | 7888 KB | Output is correct |