#include "coprobber.h"
#include "bits/stdc++.h"
using namespace std;
#ifndef EVAL
#include "grader.cpp"
#endif
const int M = 505;
int par[M][M], v;
int start(int n, bool a[MAX_N][MAX_N]){
memset(par, -1, sizeof par);
for(int i=0;i<n;i++){
queue<int> q; q.push(i);
par[i][i] = i;
while(!q.empty()){
int u = q.front(); q.pop();
for(int j=0;j<n;j++){
if(a[u][j] && par[i][j] == -1){
par[i][j] = u, q.push(j);
}
}
}
}
v = 1;
return 1;
}
int nextMove(int R){
assert(v != R);
return par[R][v];
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
1232 KB |
Output is correct |
2 |
Correct |
1 ms |
1232 KB |
Output is correct |
3 |
Incorrect |
1 ms |
1232 KB |
the situation repeated |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
1232 KB |
nextMove() returned a value that is either outside 0..N-1 or the new cop position is not a neighbour to the previous one |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
1232 KB |
Output is correct |
2 |
Correct |
2 ms |
1232 KB |
Output is correct |
3 |
Incorrect |
1 ms |
1232 KB |
the situation repeated |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
1232 KB |
Output is correct |
2 |
Correct |
1 ms |
1232 KB |
Output is correct |
3 |
Incorrect |
1 ms |
1232 KB |
the situation repeated |
4 |
Halted |
0 ms |
0 KB |
- |