답안 #16054

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
16054 2015-08-11T05:13:31 Z kaTkaHr 컴퓨터 네트워크 (BOI14_network) C++
25 / 100
130 ms 5072 KB
#include "network.h"
#include<vector>

using namespace std;

const int MX = 1005;

int ans[MX];

void findRoute (int N, int a, int b)
{
	int D = ping(a, b) + 1;
	ans[0] = a, ans[D] = b;
	for (int i = 1; i <= N; i++){
		if (i == a || i == b) continue;
		int x = ping(a, i) + 1, y = ping(i, b) + 1;
		if (x + y == D) ans[x] = i;
	}
	for (int i = 1; i <= D; i++) travelTo(ans[i]);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 123 ms 5072 KB Output is correct
2 Correct 130 ms 5072 KB Output is correct
3 Correct 94 ms 5072 KB Output is correct
4 Correct 114 ms 5072 KB Output is correct
5 Correct 46 ms 5072 KB Output is correct
6 Correct 112 ms 5072 KB Output is correct
7 Correct 0 ms 5072 KB Output is correct
8 Correct 0 ms 5072 KB Output is correct
9 Correct 0 ms 5072 KB Output is correct
10 Correct 0 ms 5072 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 51 ms 5072 KB Output isn't correct - Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 106 ms 5072 KB Output isn't correct - Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 113 ms 5072 KB Output isn't correct - Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -