# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
70408 | 2018-08-22T19:46:08 Z | Googal | 컴퓨터 네트워크 (BOI14_network) | C++14 | 149 ms | 35544 KB |
#include <iostream> #include <vector> #include "network.h" using namespace std; const int NMAX = 1e3; vector < int > p[1 + NMAX]; void findRoute (int n, int a, int b) { int dist = ping(a, b); for(int i = 1; i <= n; i++) if (i != a) p[ping(a, i) + 1].push_back(i); for(int d = 1; d <= dist; d++) { bool ok = false; for(int i = 1; i < p[d].size(); i++) { if(ping(a, p[d][i]) == 0) { if(dist == d + ping(p[d][i], b)) { a = p[d][i]; travelTo(a); ok = true; break; } } } if (ok == false) { a = p[d][0]; travelTo(a); } } travelTo(b); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 119 ms | 4348 KB | Output is correct |
2 | Correct | 140 ms | 7588 KB | Output is correct |
3 | Correct | 130 ms | 10472 KB | Output is correct |
4 | Correct | 127 ms | 13280 KB | Output is correct |
5 | Correct | 109 ms | 15676 KB | Output is correct |
6 | Correct | 107 ms | 18200 KB | Output is correct |
7 | Correct | 3 ms | 18200 KB | Output is correct |
8 | Correct | 2 ms | 18200 KB | Output is correct |
9 | Correct | 2 ms | 18200 KB | Output is correct |
10 | Correct | 2 ms | 18200 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 104 ms | 18368 KB | Output is correct |
2 | Correct | 27 ms | 18368 KB | Output is correct |
3 | Correct | 115 ms | 18368 KB | Output is correct |
4 | Correct | 106 ms | 20244 KB | Output is correct |
5 | Correct | 116 ms | 24048 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 108 ms | 24184 KB | Output is correct |
2 | Correct | 29 ms | 24184 KB | Output is correct |
3 | Correct | 149 ms | 24184 KB | Output is correct |
4 | Correct | 97 ms | 26020 KB | Output is correct |
5 | Correct | 138 ms | 29844 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 108 ms | 29844 KB | Output is correct |
2 | Correct | 30 ms | 29844 KB | Output is correct |
3 | Correct | 136 ms | 29844 KB | Output is correct |
4 | Correct | 108 ms | 31800 KB | Output is correct |
5 | Correct | 129 ms | 35544 KB | Output is correct |