#include<vector>
#include "network.h"
#define MN 1000
using namespace std;
vector<int> A[MN+1];
int d[MN+1];
void findRoute(int N,int a,int b){
for(int i=1;i<=N;i++){
d[i]=ping(i,b)+1;
if(i==b)d[i]=0;
A[d[i]].push_back(i);
}
while(a!=b){
for(auto n:A[d[a]-1]){
if(ping(a,n)==0){
travelTo(n);
a=n;
break;
}
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
133 ms |
5220 KB |
Output isn't correct - ping called with invalid arguments |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
85 ms |
5220 KB |
Output isn't correct - ping called with invalid arguments |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
49 ms |
5220 KB |
Output isn't correct - ping called with invalid arguments |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
82 ms |
5220 KB |
Output isn't correct - ping called with invalid arguments |
2 |
Halted |
0 ms |
0 KB |
- |