# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
31382 | 2017-08-20T15:36:07 Z | imaxblue | Computer Network (BOI14_network) | C++14 | 156 ms | 5180 KB |
#include "network.h" #include<vector> #include<algorithm> using namespace std; #define pb push_back int d[1005], t, n; vector<int> v[1005], ans; int get(int i, int j){ if (i==j) return 0; return ping(i, j)+1; } void findRoute (int N, int a, int b){ for (int l=1; l<=N; ++l){ v[d[l]=get(a, l)].pb(l); } n=N; while(b!=a){ for(auto i:v[d[b]-1]){ if (get(b, i)==1){ ans.pb(b); b=i; break; } } } reverse(ans.begin(), ans.end()); for (int l=0; l<ans.size(); ++l){ travelTo(ans[l]); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 156 ms | 5180 KB | Output is correct |
2 | Correct | 133 ms | 5180 KB | Output is correct |
3 | Correct | 109 ms | 5180 KB | Output is correct |
4 | Correct | 106 ms | 5180 KB | Output is correct |
5 | Correct | 143 ms | 5180 KB | Output is correct |
6 | Correct | 99 ms | 5180 KB | Output is correct |
7 | Correct | 0 ms | 5180 KB | Output is correct |
8 | Correct | 0 ms | 5180 KB | Output is correct |
9 | Correct | 0 ms | 5180 KB | Output is correct |
10 | Correct | 0 ms | 5180 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 119 ms | 5180 KB | Output is correct |
2 | Correct | 26 ms | 5180 KB | Output is correct |
3 | Correct | 116 ms | 5180 KB | Output is correct |
4 | Correct | 89 ms | 5180 KB | Output is correct |
5 | Correct | 106 ms | 5180 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 116 ms | 5180 KB | Output is correct |
2 | Correct | 33 ms | 5180 KB | Output is correct |
3 | Correct | 129 ms | 5180 KB | Output is correct |
4 | Correct | 106 ms | 5180 KB | Output is correct |
5 | Correct | 109 ms | 5180 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 86 ms | 5180 KB | Output is correct |
2 | Correct | 23 ms | 5180 KB | Output is correct |
3 | Correct | 109 ms | 5180 KB | Output is correct |
4 | Correct | 119 ms | 5180 KB | Output is correct |
5 | Correct | 116 ms | 5180 KB | Output is correct |