# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
855854 | Hard_slipper | 컴퓨터 네트워크 (BOI14_network) | C++14 | 71 ms | 28052 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "network.h"
//#include "grader.cpp"
#include<bits/stdc++.h>
using namespace std;
vector<int> path[1005][1005] = {};
int vis[1005] = {};
void findRoute (int N, int a, int b)
{
int dist = ping(a, b)+1;
for(int i =1; i <= N; i++)
{
if(i == a || i == b) continue;
int cur_dist = ping(a, i)+1;
int final_dist = ping(i, b)+1;
//cout << cur_dist << ' ' << final_dist << '\n';
if(cur_dist+final_dist == dist)
{
path[cur_dist][final_dist].push_back(i);
}
}
//path[dist][0].push_back(b);
int cur_dist = 1;
int final_dist = dist-1;
while(cur_dist < dist)
{
for(int i = 0; i < path[cur_dist][final_dist].size(); i++)
{
int cur_node = path[cur_dist][final_dist][i];
int dem_dist = ping(cur_node, b)+1;
if(dem_dist == final_dist)
{
//cout << cur_node << '\n';
travelTo(cur_node);
break;
}
}
final_dist--;
cur_dist++;
}
travelTo(b);
}
컴파일 시 표준 에러 (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... |