#include "Anthony.h"
#include <bits//stdc++.h>
using namespace std;
#define ll long long
#define iloop(m, h) for (auto i = m; i != h; i+=(m<h?1:-1))
#define jloop(m, h) for (auto j = m; j != h; j+=(m<h?1:-1))
#define kloop(m, h) for (auto k = m; k != h; k+=(m<h?1:-1))
#define lloop(m, h) for (auto l = m; l != h; l+=(m<h?1:-1))
#define iloop_(m, h, g) for (auto i = m; i != h; i+=g)
#define jloop_(m, h, g) for (auto j = m; j != h; j+=g)
#define kloop_(m, h, g) for (auto k = m; k != h; k+=g)
#define lloop_(m, h, g) for (auto l = m; l != h; l+=g)
#define getchar_unlocked _getchar_nolock // comment before submission
#define pll pair<ll,ll>
#define plll pair<ll, pll>
#define pllll pair<pll, pll>
#define vll vector<ll>
#define qll queue<ll>
#define dll deque<ll>
#define pqll priority_queue<ll>
#define gll greater<ll>
#define INF 1000000000000000
#define MOD1 1000000007
#define MOD2 998244353
#define MOD3 1000000009
vector<int> Mark(int N, int M, int A, int B, vector<int> U, vector<int> V) {
vector<int> X(M);
vector<int> adj[N];
iloop(0, M) {
adj[U[i]].push_back(V[i]);
adj[V[i]].push_back(U[i]);
}
queue<int> q, nq;
q.push(0);
int dist = 1;
bool vis[N] = {};
int dis[N];
dis[0] = 0;
while (q.size()) {
while (q.size()) {
int nd = q.front();
q.pop();
for (auto it : adj[nd]) {
if (!vis[it]) {
vis[it] = 1;
nq.push(it);
}
}
}
while (nq.size()) {
dis[nq.front()] = dist;
q.push(nq.front());
nq.pop();
}
dist++;
}
iloop(0, M) {
X[i] = min(dis[U[i]], dis[V[i]])%3;
//cout << X[i] << " ";
}
//cout << "\n";
return X;
}
#include "Catherine.h"
#include <bits//stdc++.h>
using namespace std;
#define ll long long
#define iloop(m, h) for (auto i = m; i != h; i+=(m<h?1:-1))
#define jloop(m, h) for (auto j = m; j != h; j+=(m<h?1:-1))
#define kloop(m, h) for (auto k = m; k != h; k+=(m<h?1:-1))
#define lloop(m, h) for (auto l = m; l != h; l+=(m<h?1:-1))
#define iloop_(m, h, g) for (auto i = m; i != h; i+=g)
#define jloop_(m, h, g) for (auto j = m; j != h; j+=g)
#define kloop_(m, h, g) for (auto k = m; k != h; k+=g)
#define lloop_(m, h, g) for (auto l = m; l != h; l+=g)
#define getchar_unlocked _getchar_nolock // comment before submission
#define pll pair<ll,ll>
#define plll pair<ll, pll>
#define pllll pair<pll, pll>
#define vll vector<ll>
#define qll queue<ll>
#define dll deque<ll>
#define pqll priority_queue<ll>
#define gll greater<ll>
#define INF 1000000000000000
#define MOD1 1000000007
#define MOD2 998244353
#define MOD3 1000000009
int oa, ob;
void Init(int A, int B) {
oa = A, ob = B;
}
int Move(vector<int> y) {
//iloop(0, 3) cout << y[i] << " ";
cout << "\n";
if (y[0] == 0) {
if (y[1] == 0) return 2;
return 1;
}
if (y[1] == 0) {
if (y[2] == 0) return 0;
return 2;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
37 ms |
15396 KB |
Your program terminated abnormally, or printed anything to standard output. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
37 ms |
15396 KB |
Your program terminated abnormally, or printed anything to standard output. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
36 ms |
13052 KB |
Your program terminated abnormally, or printed anything to standard output. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
36 ms |
13052 KB |
Your program terminated abnormally, or printed anything to standard output. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
644 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
7 ms |
2244 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
7 ms |
2180 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |