#include "coprobber.h"
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int menge = 0 , jet = 0 , r = 0;
int cmp = 0 ;
bool done = 0;
vector<vector<int> >num ;
vector<vector<bool> > a;
vector<int >vis(500+10 , 0), comp;
int start(int N, bool A[MAX_N][MAX_N])
{
int re = 0 , erge = -1;
for(int i = 0 ;i < N ; i++){
re = 0;
a.push_back(vector<bool>());
num.push_back(vector<int>());
for(int j = 0 ; j < N ; j++){
a[i].push_back(A[i][j]);
if(a[i][j] == 1){
num[i].push_back(j);
re++;
}
}
if(re == 1){
erge = i;
}
}
menge = N;
jet = erge;
vis[erge ] = 1;
return erge;
}
int nextMove(int R)
{
if(R == jet){
return jet;
}
if(num[jet][R] == 1){
return R;
}
else{
for(int i = 0 ; i < menge ; i++){
if(vis[i] == 0 && a[jet][i] == 1){
vis[i] = 1;
return i;
}
}
}
return jet;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
200 KB |
Output is correct |
2 |
Correct |
1 ms |
328 KB |
Output is correct |
3 |
Incorrect |
1 ms |
328 KB |
the situation repeated |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
200 KB |
Output is correct |
2 |
Correct |
1 ms |
200 KB |
Output is correct |
3 |
Incorrect |
1 ms |
328 KB |
the situation repeated |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
200 KB |
Output is correct |
2 |
Correct |
1 ms |
328 KB |
Output is correct |
3 |
Incorrect |
1 ms |
328 KB |
the situation repeated |
4 |
Halted |
0 ms |
0 KB |
- |