#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 <= N; i++) travelTo(ans[i]);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
127 ms |
5072 KB |
Output isn't correct - travelTo called with invalid argument |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
87 ms |
5072 KB |
Output isn't correct - Travelling to nonadjacent computer |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
77 ms |
5072 KB |
Output isn't correct - Travelling to nonadjacent computer |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
117 ms |
5072 KB |
Output isn't correct - Travelling to nonadjacent computer |
2 |
Halted |
0 ms |
0 KB |
- |