#include "Anthony.h"
#include <bits/stdc++.h>
using namespace std;
typedef vector<int>vi;
typedef vector<vi>vvi;
vi Mark(int N, int M, int A, int B,vi U, vi V) {
vi mark(M);
vvi g(N+1);
vi D(N+1,-1);
queue<int>q;
q.push(0);
while(q.size()){
int x=q.front();
q.pop();
for(int nbr:g[x])
if(D[nbr]==-1)
D[nbr]=D[x]+1,q.push(nbr);
}
for(int i=0; i<M; i++)
if(min(D[U[i]],D[V[i]])%2==0)
mark[i]=1;
return mark;
}
#include "Catherine.h"
#include <bits/stdc++.h>
using namespace std;
typedef vector<int>vi;
typedef vector<vi>vvi;
#define all(x) x.begin(),x.end()
//I can retrieve information between moves
int A,B;
void Init(int _A, int _B) {
A=_A,B=_B;
}
bool reached_leaf=0;
int Move(vi y) {
if(accumulate(all(y),0)==1){
reached_leaf=1;
return -1;
}
for(int i=0; i<y.size(); i++)
if(y[i]==1)
return i;
return A;
}
Compilation message
Catherine.cpp: In function 'int Move(vi)':
Catherine.cpp:24:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
24 | for(int i=0; i<y.size(); i++)
| ~^~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
28 ms |
13716 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
28 ms |
13716 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
28 ms |
11692 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
28 ms |
11692 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
868 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
26 ms |
10040 KB |
Wrong Answer [4] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
25 ms |
10044 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |