# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
42634 | 2018-03-01T15:20:39 Z | XmtosX | Computer Network (BOI14_network) | C++14 | 146 ms | 58644 KB |
#include <bits/stdc++.h> using namespace std; void findRoute(int N,int a,int b); int ping(int i,int j); void travelTo(int k); int n,dis[1004]; vector <int> v; void findRoute(int N,int a,int b) { n=N; for (int i=1;i<=n;i++) { if (i==b) continue; dis[i]=ping(i,b); } int x=dis[a],last=a; while (x) { for (int i=1;i<=n;i++) { if (dis[i]==x-1&&ping(i,last)==0) { last=i; x--; v.push_back(i); break; } } } for (int i=0;i<v.size();i++) { travelTo(v[i]); } travelTo(b); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 146 ms | 8056 KB | Output is correct |
2 | Correct | 137 ms | 11296 KB | Output is correct |
3 | Correct | 102 ms | 14200 KB | Output is correct |
4 | Correct | 101 ms | 16836 KB | Output is correct |
5 | Correct | 99 ms | 19388 KB | Output is correct |
6 | Correct | 112 ms | 21872 KB | Output is correct |
7 | Correct | 1 ms | 21872 KB | Output is correct |
8 | Correct | 1 ms | 21872 KB | Output is correct |
9 | Correct | 1 ms | 21872 KB | Output is correct |
10 | Correct | 2 ms | 21872 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 104 ms | 24488 KB | Output is correct |
2 | Correct | 26 ms | 24488 KB | Output is correct |
3 | Correct | 116 ms | 28604 KB | Output is correct |
4 | Correct | 92 ms | 30576 KB | Output is correct |
5 | Correct | 131 ms | 34180 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 111 ms | 36624 KB | Output is correct |
2 | Correct | 29 ms | 36624 KB | Output is correct |
3 | Correct | 121 ms | 40832 KB | Output is correct |
4 | Correct | 92 ms | 42720 KB | Output is correct |
5 | Correct | 120 ms | 46520 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 105 ms | 48832 KB | Output is correct |
2 | Correct | 27 ms | 48832 KB | Output is correct |
3 | Correct | 133 ms | 53112 KB | Output is correct |
4 | Correct | 102 ms | 55076 KB | Output is correct |
5 | Correct | 130 ms | 58644 KB | Output is correct |