#include<bits/stdc++.h>
#include "Anthony.h"
using namespace std;
#define int long long
#define ll long long
#define pii pair<int,int>
#define F first
#define S second
#define endl '\n'
#define pb push_back
#define sz(a) (int)a.size()
#define all(a) a.begin(),a.end()
const int mod = 1e9 + 7;
const int N = 1e6 + 15;
const ll inf = 1e18;
int X[N];
vector<pii> adj[N];
void dfs(int node, int par, int cur){
for (auto it : adj[node]){
if (it.F == node) continue;
X[it.S] = (cur+1)%3;
dfs(it.F, node, X[it.S]);
}
}
vector<int> Mark(int N, int M, int A, int B, vector<int> U, vector<int> V) {
vector<int> x(M);
for (int i=0;i<M;i++){
adj[U[i]].pb({V[i],i});
adj[V[i]].pb({U[i],i});
}
dfs(1,0,-1);
for (int i=0;i<M;i++){
x[i] = X[i];
}
return x;
}
void Init(int A, int B) {
return;
}
int Move(vector<int> y) {
if (y[0]&&y[1]) return 0;
if (y[1]&&y[2]) return 1;
if (y[2]&&y[0]) return 2;
return -1;
}
#include<bits/stdc++.h>
#include "Anthony.h"
using namespace std;
#define int long long
#define ll long long
#define pii pair<int,int>
#define F first
#define S second
#define endl '\n'
#define pb push_back
#define sz(a) (int)a.size()
#define all(a) a.begin(),a.end()
const int mod = 1e9 + 7;
const int N = 1e6 + 15;
const ll inf = 1e18;
int X[N];
vector<pii> adj[N];
void dfs(int node, int par, int cur){
for (auto it : adj[node]){
if (it.F == node) continue;
X[it.S] = (cur+1)%3;
dfs(it.F, node, X[it.S]);
}
}
vector<int> Mark(int N, int M, int A, int B, vector<int> U, vector<int> V) {
vector<int> x(M);
for (int i=0;i<M;i++){
adj[U[i]].pb({V[i],i});
adj[V[i]].pb({U[i],i});
}
dfs(1,0,-1);
for (int i=0;i<M;i++){
x[i] = X[i];
}
return x;
}
void Init(int A, int B) {
return;
}
int Move(vector<int> y) {
if (y[0]&&y[1]) return 0;
if (y[1]&&y[2]) return 1;
if (y[2]&&y[0]) return 2;
return -1;
}
Compilation message
/usr/bin/ld: /tmp/cc6C54ub.o: in function `main':
grader_anthony.cpp:(.text.startup+0x191): undefined reference to `Mark(int, int, int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status
/usr/bin/ld: /tmp/cchtrGMU.o: in function `main':
grader_catherine.cpp:(.text.startup+0x41c): undefined reference to `Init(int, int)'
/usr/bin/ld: grader_catherine.cpp:(.text.startup+0xcfa): undefined reference to `Move(std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status