# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
151872 | 2019-09-05T08:20:26 Z | Ruxandra985 | 컴퓨터 네트워크 (BOI14_network) | C++14 | 117 ms | 8164 KB |
#include <cstdio> #include "network.h" void findRoute (int n,int a,int b){ int da[n+1],db[n+1]; int i,curr,x,y,xn,yn,nxt; for (i=1;i<=n;i++){ if (i!=a) da[i] = ping (a,i); if (i!=b) db[i] = ping (b,i); } curr = a; x = -1; y = da[b]; while (curr!=b){ for (i=1;i<=n;i++){ if (i!=curr){ if (i!=b){ xn = da[i]; yn = db[i]; } else { xn = da[i]; yn = -1; } if (x+1 == xn && y-1 == yn){ nxt = i; break; } } } travelTo(nxt); curr = nxt; x++; y--; } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 117 ms | 8164 KB | Output is correct |
2 | Correct | 112 ms | 7488 KB | Output is correct |
3 | Correct | 102 ms | 7032 KB | Output is correct |
4 | Correct | 102 ms | 7064 KB | Output is correct |
5 | Correct | 102 ms | 6732 KB | Output is correct |
6 | Correct | 103 ms | 6628 KB | Output is correct |
7 | Correct | 2 ms | 256 KB | Output is correct |
8 | Correct | 2 ms | 376 KB | Output is correct |
9 | Correct | 2 ms | 376 KB | Output is correct |
10 | Correct | 2 ms | 632 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 106 ms | 6664 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 106 ms | 6676 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 106 ms | 6664 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |