#include "network.h"
int Ans[1001];
void findRoute (int N, int a, int b)
{
int i, Dist=ping(a,b), x, y;
for(i=1 ; i<=N ; i++)
if(i!=a && i!=b)
{
x=ping(a,i);
y=ping(i,b);
if(Dist==x+y+1)
Ans[x]=i;
}
Ans[Dist]=b;
for(i=0 ; i<=Dist ; i++)
travelTo(Ans[i]);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
116 ms |
5076 KB |
Output is correct |
2 |
Correct |
116 ms |
5076 KB |
Output is correct |
3 |
Correct |
108 ms |
5076 KB |
Output is correct |
4 |
Correct |
112 ms |
5076 KB |
Output is correct |
5 |
Correct |
108 ms |
5076 KB |
Output is correct |
6 |
Correct |
108 ms |
5076 KB |
Output is correct |
7 |
Correct |
0 ms |
5076 KB |
Output is correct |
8 |
Correct |
0 ms |
5076 KB |
Output is correct |
9 |
Correct |
0 ms |
5076 KB |
Output is correct |
10 |
Correct |
0 ms |
5076 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
108 ms |
5076 KB |
Output isn't correct - Travelling to nonadjacent computer |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
116 ms |
5076 KB |
Output isn't correct - Travelling to nonadjacent computer |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
104 ms |
5076 KB |
Output isn't correct - Travelling to nonadjacent computer |
2 |
Halted |
0 ms |
0 KB |
- |