| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1314798 | norrawichzzz | 컴퓨터 네트워크 (BOI14_network) | C++20 | 52 ms | 4364 KiB |
#include "network.h"
#include <bits/stdc++.h>
using namespace std;
void findRoute (int N, int a, int b)
{
/*
* Obviously, this is not a good solution.
* Replace it with your own code.
*/
int dist= ping(a,b), prv=a;
vector<int> tob(N+1, -1);
vector<bool> vst(N+1, false);
vst[a] = true;
for (int i=0; i<=dist; i++) {
for (int j=1; j<=N; j++) {
if (vst[j]) continue;
if (tob[j] == -1 && j != b) tob[j] = (j != b ? ping(j, b) : 0);
//cout<< j<< ' '<<fa[j]<< ' '<< tob[j]<< ' '<< dist<< '\n';
if (tob[j] == dist-i-1 && ping(prv, j) == 0) {
travelTo(j);
vst[j] = true;
prv = j;
break;
}
}
}
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
