#include <bits/stdc++.h>
#include "grader.cpp"
using namespace std;
#define cin(vec) for(auto& i : vec) cin >> i
#define cout(vec) for(auto& i : vec) cout << i << " "; cout << "\n";
#define fast ios::sync_with_stdio(0);cin.tie(0);
#define loop(i,a,b) for (int i = a; i < b; i++)
#define F first
#define S second
#define pb(n) push_back(n)
#define pf(n) push_front(n)
#define dci(d) fixed<<setprecision(d)
#define sp ' '
#define el '\n'
#define all(v) v.begin(),v.end()
int const N=30005;
int n,k,vis[N],vid;
vector<int>g[N],mx;
int dfs(int u,int num){
vis[u]=vid;
if(u<k){
if(u<num){
return 1;
}
return 0;
}
int c=0;
for(auto u:g[u]){
if(vis[u]!=vid){
vis[u]=vid;
mx[u]=max(mx[u],num);
c|=dfs(u,num);
}
}
return c;
}
void init(int _n, int _k) {
n=_n;k=_k;
for(int i=0;i<k-1;i++)g[i].pb(i+1),mx.pb(i);
for(int i=k;i<n;i++)mx.pb(0);
}
int add_teleporter(int u, int v) {
if(u<k&&v<k){
if(v<=u)return 1;
}
else if(u==v){
}
else{
g[u].pb(v);
if(dfs(u,mx[u])){
return 1;
}
}
return 0;
}
Compilation message
game.cpp:2:10: fatal error: grader.cpp: No such file or directory
2 | #include "grader.cpp"
| ^~~~~~~~~~~~
compilation terminated.