#include "game.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define INF 1e18
#define ss second
#define ff first
int n,m,l,r,i,j,k,ii,jj,x,y;
bitset<30001> vis[1001];
vector<int> v[30001];
bool shit;
void init(int n, int k) {
n=n;
k=k;
for(i=0;i<k;i++) vis[i].set(i);
}
void dfs(ll node){
if(shit) return;
if(node<=r){
shit=1;
return;
}
if(vis[i][node]) return;
vis[i].set(node);
for(int it: v[node]) dfs(it);
}
int add_teleporter(int u, int v){
v[u].pb(v);
for(i=0;i<k;i++){
if(vis[i][u]){
shit=0;
r=i;
dfs(v);
if(shit) return 1;
}
}
return 0;
}
Compilation message
game.cpp: In function 'int add_teleporter(int, int)':
game.cpp:29:3: error: invalid types 'int[int]' for array subscript
29 | v[u].pb(v);
| ^