#include "Joi.h"
#include <bits/stdc++.h>
using namespace std;
#define foru(i,a,b) for(int i=(a); i<=(b); ++i)
#define ford(i,a,b) for(int i=(a); i>=(b); --i)
#define rep(i,a) for(int i=0; i<(a); ++i)
#define sz(a) (int)(a).size()
#define all(a) (a).begin(),(a).end()
#define bit(s,i) (((s)>>(i))&1)
#define ii pair<int,int>
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define ll long long
#define _ << " " <<
void Joi(int N, int M, int A[], int B[], ll X, int T){
    rep(i,N) MessageBoard(i,X>>i&1);
}
#include "Ioi.h"
#include <bits/stdc++.h>
using namespace std;
#define foru(i,a,b) for(int i=(a); i<=(b); ++i)
#define ford(i,a,b) for(int i=(a); i>=(b); --i)
#define rep(i,a) for(int i=0; i<(a); ++i)
#define sz(a) (int)(a).size()
#define all(a) (a).begin(),(a).end()
#define bit(s,i) (((s)>>(i))&1)
#define ii pair<int,int>
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define ll long long
#define _ << " " <<
const int MAX=20202;
bool mark[MAX],vis[MAX];
vector<int> adj[MAX];
void dfs(int u){
    vis[u]=true;
    for(int v:adj[u])if(!vis[v]){
        mark[v]=Move(v);
        dfs(v);
        Move(u);
    }
}
ll Ioi(int N, int M, int A[], int B[], int P, int V, int T){
    rep(i,M){
        adj[A[i]].eb(B[i]);
        adj[B[i]].eb(A[i]);
    }
    mark[P]=V;
    dfs(P);
    ll res=0;
    rep(i,60) if(mark[i]) res|=1LL<<i;
    return res;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... |