#include "Joi.h"
using namespace std;
#include<bits/stdc++.h>
#define vec vector
namespace joi {
const int MXN = 10'005;
int t = 0;
vec<int> tree[MXN];
int depth[MXN];
int ind[MXN];
vec<int> g[MXN];
void dfs1(int u, vec<bool>& vis) {
vis[u] = true;
for(int v : g[u]) {
if(vis[v]) continue;
dfs1(v, vis);
depth[u] = max(depth[u], 1+depth[v]);
tree[u].push_back(v);
}
sort(tree[u].begin(), tree[u].end(), [&](int x, int y) { return depth[x] > depth[y]; });
}
void dfs2(int u) {
ind[u] = t;
t += 1;
for(int v : tree[u]) {
dfs2(v);
}
}
void Joi(int N, int M, int A[], int B[], long long X, int T) {
vec<bool> vis(N);
for(int i = 0; i<M; i++) {
g[A[i]].push_back(B[i]);
g[B[i]].push_back(A[i]);
}
dfs1(0, vis);
dfs2(0);
for(int i = 0; i < N; i++){
int bi = ind[i] % 60;
int val = (X & ((long long)1<<bi)) != 0;
MessageBoard(i, val);
}
}
}
void Joi(int N, int M, int A[], int B[], long long X, int T) { joi::Joi(N, M, A, B, X, T); };
Compilation message
/usr/bin/ld: /tmp/ccvCxQ6i.o: in function `main':
grader_ioi.cpp:(.text.startup+0x3f2): undefined reference to `Ioi(int, int, int*, int*, int, int, int)'
collect2: error: ld returned 1 exit status