#include "Anthony.h"
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define FOR(i, x, y) for(ll i=x; i<y; i++)
#define FORNEG(i, x, y) for(ll i=x; i>y; i--)
#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL)
namespace{}
vector<int> Mark(int N, int M, int A, int B, vector<int> U, vector<int> V) {
vector<int> edges[N];
FOR(i,0,M){
edges[U[i]].push_back(V[i]);
edges[V[i]].push_back(U[i]);
}
bool visited[N];
FOR(i,0,N) visited[i] = false;
vector<int> x(N);
FOR(i,0,N) x[i] = 0;
queue<vector<int>> q;
visited[0] = true;
q.push({0,0});
while (q.size()){
vector<int> node = q.front();
q.pop();
x[node[0]] = node[1];
for (auto&i : edges[node[0]]){
if (!visited[i]){
visited[i] = true;
q.push({i, node[1]+1});
}
}
}
vector<int> ans(M);
FOR(i,0,M){
ans[i] = (min(x[U[i]], x[V[i]])%2);
}
return ans;
}
#include "Catherine.h"
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define FOR(i, x, y) for(ll i=x; i<y; i++)
#define FORNEG(i, x, y) for(ll i=x; i>y; i--)
#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL)
namespace {
int A, B;
int variable_example = 0;
} // namespace
void Init(int A, int B) {
::A = A;
::B = B;
}
int Move(std::vector<int> y) {
if (y[0] ==1 && y[1]!=1) return 0;
if (y[0]!=1 && y[1] ==1) return 1;
if (y[0]==0 and y[1]==0) return -1;
if (y[0]==0) return 1;
return 0;
// if (!y[0] && y[1] && y[2]){
// return 1;
// }
// if (y[0] && !y[1] && y[2]){
// return 2;
// }
// if (y[0] && y[1] && !y[2]){
// return 0;
// }
// if (y[0] && !y[1] && !y[2]){
// return 0;
// }
// if (!y[0] && y[1] && !y[2]){
// return 1;
// }
// if (!y[0] && !y[1] && y[2]){
// return 2;
// }
}
Compilation message
Catherine.cpp:16:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
16 | int variable_example = 0;
| ^~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
37 ms |
15464 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
37 ms |
15464 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
40 ms |
13312 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
40 ms |
13312 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
912 KB |
Output is correct |
2 |
Correct |
1 ms |
520 KB |
Output is correct |
3 |
Correct |
2 ms |
912 KB |
Output is correct |
4 |
Correct |
2 ms |
908 KB |
Output is correct |
5 |
Correct |
2 ms |
908 KB |
Output is correct |
6 |
Correct |
2 ms |
900 KB |
Output is correct |
7 |
Correct |
2 ms |
780 KB |
Output is correct |
8 |
Correct |
2 ms |
908 KB |
Output is correct |
9 |
Correct |
2 ms |
860 KB |
Output is correct |
10 |
Correct |
2 ms |
780 KB |
Output is correct |
11 |
Correct |
2 ms |
908 KB |
Output is correct |
12 |
Incorrect |
2 ms |
772 KB |
Wrong Answer [6] |
13 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
39 ms |
11644 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
40 ms |
11632 KB |
Output is correct |
2 |
Incorrect |
37 ms |
11832 KB |
Wrong Answer [6] |
3 |
Halted |
0 ms |
0 KB |
- |