#include "Anthony.h"
#include <vector>
#include <bits/stdc++.h>
#define maxn 20005
#define pii pair<int, int>
using namespace std;
namespace {
vector<int> adj[maxn];
int arr[6] = {0, 0, 1, 0, 1, 1};
const int inf = 8e7;
};
vector<int> Mark(int N, int M, int A, int B,
vector<int> U, vector<int> V) {
for (int i = 0;i < M;i++) adj[U[i]].push_back(V[i]), adj[V[i]].push_back(U[i]);
queue<int> que;
que.push(0);
vector<int> X(M), d(N, inf);
d[0] = 0;
while (que.size()) {
//cout << "zisk" << endl;
int cur = que.front();que.pop();
for (int v:adj[cur]) {
if (d[cur] + 1 < d[v]) {
d[v] = d[cur] + 1;
que.push(v);
}
}
}
for (int i = 0; i < M; ++i) {
if (d[U[i]] > d[V[i]]) swap(U[i], V[i]);
X[i] = d[U[i]] % 2;
}
return X;
}
#include "Catherine.h"
#include <vector>
#include "assert.h"
using namespace std;
namespace {
int A, B;
int prv = 0;
};
void Init(int A, int B) {
::A = A;
::B = B;
}
int Move(vector<int> y) {
if (!y[0] && !y[1]) return -1;
if (y[prv ^ 1]) {
prv ^= 1;
return prv;
} else {
return prv;
}
}
/*
7 6 3 6 1
0 2
0 4
1 2
1 3
1 5
4 6
*/
Compilation message
Anthony.cpp:9:6: warning: '{anonymous}::arr' defined but not used [-Wunused-variable]
9 | int arr[6] = {0, 0, 1, 0, 1, 1};
| ^~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
42 ms |
15232 KB |
Output is correct |
2 |
Correct |
1 ms |
1012 KB |
Output is correct |
3 |
Incorrect |
36 ms |
14836 KB |
Wrong Answer [6] |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
42 ms |
15232 KB |
Output is correct |
2 |
Correct |
1 ms |
1012 KB |
Output is correct |
3 |
Incorrect |
36 ms |
14836 KB |
Wrong Answer [6] |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
39 ms |
12844 KB |
Output is correct |
2 |
Correct |
2 ms |
1000 KB |
Output is correct |
3 |
Incorrect |
35 ms |
12528 KB |
Wrong Answer [6] |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
39 ms |
12844 KB |
Output is correct |
2 |
Correct |
2 ms |
1000 KB |
Output is correct |
3 |
Incorrect |
35 ms |
12528 KB |
Wrong Answer [6] |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
1260 KB |
Output is correct |
2 |
Correct |
1 ms |
1000 KB |
Output is correct |
3 |
Correct |
3 ms |
1260 KB |
Output is correct |
4 |
Correct |
2 ms |
1260 KB |
Output is correct |
5 |
Correct |
3 ms |
1260 KB |
Output is correct |
6 |
Correct |
2 ms |
1256 KB |
Output is correct |
7 |
Correct |
3 ms |
1268 KB |
Output is correct |
8 |
Correct |
2 ms |
1264 KB |
Output is correct |
9 |
Correct |
2 ms |
1260 KB |
Output is correct |
10 |
Correct |
2 ms |
1256 KB |
Output is correct |
11 |
Correct |
2 ms |
1288 KB |
Output is correct |
12 |
Correct |
2 ms |
1260 KB |
Output is correct |
13 |
Correct |
2 ms |
1260 KB |
Output is correct |
14 |
Correct |
2 ms |
1260 KB |
Output is correct |
15 |
Correct |
2 ms |
1272 KB |
Output is correct |
16 |
Correct |
2 ms |
1268 KB |
Output is correct |
17 |
Correct |
2 ms |
1268 KB |
Output is correct |
18 |
Correct |
2 ms |
1260 KB |
Output is correct |
19 |
Correct |
1 ms |
1268 KB |
Output is correct |
20 |
Correct |
2 ms |
1260 KB |
Output is correct |
21 |
Correct |
2 ms |
1268 KB |
Output is correct |
22 |
Correct |
2 ms |
1260 KB |
Output is correct |
23 |
Correct |
2 ms |
1268 KB |
Output is correct |
24 |
Correct |
2 ms |
1296 KB |
Output is correct |
25 |
Correct |
1 ms |
1276 KB |
Output is correct |
26 |
Correct |
1 ms |
1268 KB |
Output is correct |
27 |
Correct |
2 ms |
1268 KB |
Output is correct |
28 |
Correct |
2 ms |
1296 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
44 ms |
11020 KB |
Output is correct |
2 |
Correct |
45 ms |
11600 KB |
Output is correct |
3 |
Correct |
1 ms |
1000 KB |
Output is correct |
4 |
Correct |
40 ms |
10920 KB |
Output is correct |
5 |
Correct |
48 ms |
12548 KB |
Output is correct |
6 |
Correct |
46 ms |
12700 KB |
Output is correct |
7 |
Incorrect |
40 ms |
11680 KB |
Wrong Answer [6] |
8 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
31 ms |
11128 KB |
Output is correct |
2 |
Correct |
40 ms |
11472 KB |
Output is correct |
3 |
Correct |
1 ms |
1008 KB |
Output is correct |
4 |
Correct |
28 ms |
10980 KB |
Output is correct |
5 |
Correct |
55 ms |
12680 KB |
Output is correct |
6 |
Correct |
38 ms |
12716 KB |
Output is correct |
7 |
Incorrect |
35 ms |
11788 KB |
Wrong Answer [6] |
8 |
Halted |
0 ms |
0 KB |
- |