# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
752576 | 2023-06-03T08:49:04 Z | penguin133 | Computer Network (BOI14_network) | C++17 | 96 ms | 4972 KB |
#include <bits/stdc++.h> using namespace std; //#define int long long #include "network.h" #define pi pair<int, int> #define pii pair<int, pi> #define fi first #define se second #ifdef _WIN32 #define getchar_unlocked _getchar_nolock #endif mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); vector <int> tmp[10005]; void findRoute (int N, int a, int b) { int hi; for(int i=1;i<=N;i++){ if(i == b)continue; int x = ping(i, b); if(i == a)hi = x; else tmp[x].push_back(i); } int cur = a; while(hi){ for(auto i : tmp[hi-1]){ if(ping(cur, i) == 0){ travelTo(i); cur = i; hi--; break; } } } travelTo(b); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 74 ms | 4492 KB | Output is correct |
2 | Correct | 85 ms | 4860 KB | Output is correct |
3 | Correct | 75 ms | 4808 KB | Output is correct |
4 | Correct | 70 ms | 4812 KB | Output is correct |
5 | Correct | 74 ms | 4776 KB | Output is correct |
6 | Correct | 78 ms | 4844 KB | Output is correct |
7 | Correct | 1 ms | 468 KB | Output is correct |
8 | Correct | 1 ms | 596 KB | Output is correct |
9 | Correct | 1 ms | 468 KB | Output is correct |
10 | Correct | 1 ms | 596 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 71 ms | 4468 KB | Output is correct |
2 | Correct | 19 ms | 2900 KB | Output is correct |
3 | Correct | 90 ms | 4892 KB | Output is correct |
4 | Correct | 69 ms | 4768 KB | Output is correct |
5 | Correct | 77 ms | 4856 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 72 ms | 4404 KB | Output is correct |
2 | Correct | 20 ms | 2880 KB | Output is correct |
3 | Correct | 96 ms | 4972 KB | Output is correct |
4 | Correct | 83 ms | 4780 KB | Output is correct |
5 | Correct | 77 ms | 4872 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 72 ms | 4484 KB | Output is correct |
2 | Correct | 20 ms | 2892 KB | Output is correct |
3 | Correct | 84 ms | 4832 KB | Output is correct |
4 | Correct | 73 ms | 4516 KB | Output is correct |
5 | Correct | 72 ms | 4520 KB | Output is correct |