This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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(par[i][j] == -1){
par[i][j] = u, q.push(j);
}
}
}
}
v = 1;
return 1;
}
int nextMove(int R){
v = par[R][v];
return v;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |