# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
47319 | 2018-04-30T13:44:08 Z | rajarshi_basu | Computer Network (BOI14_network) | C++14 | 171 ms | 4588 KB |
#include "network.h" #define FOR(i,n) for(int i=0;i<n;i++) #define ll long long int #define mp make_pair #define pb push_back #define iii pair<int, pair<int,int> > #define vi vector<int> using namespace std; void findRoute(int N,int a,int b){ int dist[N]; for(int i = 1;i<=N; i++){ if(i == b)dist[i] = 0; else{ dist[i] = ping(i,b) + 1; } } int node = a; while(true){ if(node == b)break; for(int i=1;i<=N;i++){ if((dist[i] == dist[node] - 1) and (ping(node,i) == 0)){ travelTo(i); node = i; } } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 131 ms | 4216 KB | Output is correct |
2 | Correct | 118 ms | 4456 KB | Output is correct |
3 | Correct | 106 ms | 4456 KB | Output is correct |
4 | Correct | 106 ms | 4456 KB | Output is correct |
5 | Correct | 112 ms | 4456 KB | Output is correct |
6 | Correct | 105 ms | 4456 KB | Output is correct |
7 | Correct | 2 ms | 4456 KB | Output is correct |
8 | Correct | 2 ms | 4456 KB | Output is correct |
9 | Correct | 2 ms | 4456 KB | Output is correct |
10 | Correct | 2 ms | 4456 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 151 ms | 4580 KB | Output is correct |
2 | Correct | 29 ms | 4580 KB | Output is correct |
3 | Correct | 118 ms | 4580 KB | Output is correct |
4 | Correct | 97 ms | 4580 KB | Output is correct |
5 | Correct | 116 ms | 4580 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 171 ms | 4580 KB | Output is correct |
2 | Correct | 46 ms | 4580 KB | Output is correct |
3 | Correct | 119 ms | 4580 KB | Output is correct |
4 | Correct | 104 ms | 4588 KB | Output is correct |
5 | Correct | 140 ms | 4588 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 106 ms | 4588 KB | Output is correct |
2 | Correct | 27 ms | 4588 KB | Output is correct |
3 | Correct | 125 ms | 4588 KB | Output is correct |
4 | Correct | 95 ms | 4588 KB | Output is correct |
5 | Correct | 127 ms | 4588 KB | Output is correct |