# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
165064 | 2019-11-25T03:23:55 Z | Lawliet | Computer Network (BOI14_network) | C++14 | 126 ms | 8144 KB |
#include <bits/stdc++.h> #include "network.h" using namespace std; const int MAXN = 1010; vector< int > ord[MAXN]; void findRoute (int N, int S, int T) { int minDist = ping( S , T ); ord[ minDist ].push_back( S ); for(int i = 1 ; i <= N ; i++) { if( i == S || i == T ) continue; int cur = ping( i , T ); ord[ cur ].push_back( i ); } int curNode = S; int curDist = minDist; while( curDist > 0 ) { curDist--; for(int j = 0 ; j < ord[ curDist ].size() ; j++) { int viz = ord[ curDist ][ j ]; if( ping( curNode , viz ) == 0 ) { curNode = viz; break; } } travelTo( curNode ); } travelTo( T ); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 120 ms | 8144 KB | Output is correct |
2 | Correct | 118 ms | 7672 KB | Output is correct |
3 | Correct | 103 ms | 7160 KB | Output is correct |
4 | Correct | 104 ms | 7132 KB | Output is correct |
5 | Correct | 103 ms | 6776 KB | Output is correct |
6 | Correct | 103 ms | 6776 KB | Output is correct |
7 | Correct | 2 ms | 380 KB | Output is correct |
8 | Correct | 2 ms | 376 KB | Output is correct |
9 | Correct | 3 ms | 376 KB | Output is correct |
10 | Correct | 2 ms | 632 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 111 ms | 6884 KB | Output is correct |
2 | Correct | 29 ms | 2908 KB | Output is correct |
3 | Correct | 119 ms | 7944 KB | Output is correct |
4 | Correct | 93 ms | 6236 KB | Output is correct |
5 | Correct | 126 ms | 8120 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 110 ms | 6808 KB | Output is correct |
2 | Correct | 27 ms | 2936 KB | Output is correct |
3 | Correct | 121 ms | 7916 KB | Output is correct |
4 | Correct | 94 ms | 6236 KB | Output is correct |
5 | Correct | 123 ms | 8084 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 108 ms | 7060 KB | Output is correct |
2 | Correct | 27 ms | 2936 KB | Output is correct |
3 | Correct | 120 ms | 7928 KB | Output is correct |
4 | Correct | 95 ms | 6264 KB | Output is correct |
5 | Correct | 118 ms | 8056 KB | Output is correct |