garden.cpp:3:1: error: 'vector' does not name a type
vector<int> adj[MAX_N*2];
^~~~~~
garden.cpp:4:10: error: 'MAX_N' was not declared in this scope
int best[MAX_N][2];
^~~~~
garden.cpp:5:15: error: 'MAX_N' was not declared in this scope
int dist[2][2*MAX_N];
^~~~~
garden.cpp:6:16: error: 'MAX_N' was not declared in this scope
bool mark[2][2*MAX_N];
^~~~~
garden.cpp:8:11: error: 'MAX_N' was not declared in this scope
int cnt[2*MAX_N];
^~~~~
garden.cpp:9:14: error: 'MAX_N' was not declared in this scope
int cumcnt[2*MAX_N];
^~~~~
garden.cpp: In function 'void DFS(int)':
garden.cpp:12:8: error: 'adj' was not declared in this scope
int d=adj[u].size();
^~~
garden.cpp:14:7: error: 'mark' was not declared in this scope
if(!mark[num][adj[u][i]]){
^~~~
garden.cpp:16:4: error: 'dist' was not declared in this scope
dist[num][adj[u][i]]=dist[num][u]+1;
^~~~
garden.cpp:16:4: note: suggested alternative: 'int'
dist[num][adj[u][i]]=dist[num][u]+1;
^~~~
int
garden.cpp:20:11: error: 'dist' was not declared in this scope
cyclen=dist[num][u]+1;
^~~~
garden.cpp:20:11: note: suggested alternative: 'int'
cyclen=dist[num][u]+1;
^~~~
int
garden.cpp: In function 'void count_routes(int, int, int, int (*)[2], int, int*)':
garden.cpp:29:3: error: 'best' was not declared in this scope
best[i][0]=best[i][1]=-1;
^~~~
garden.cpp:32:6: error: 'best' was not declared in this scope
if(best[R[i][0]][0]==-1){
^~~~
garden.cpp:40:6: error: 'best' was not declared in this scope
if(best[R[i][1]][0]==-1){
^~~~
garden.cpp:51:6: error: 'best' was not declared in this scope
if(best[best[i][0]][0]==i && best[best[i][0]][1]!=-1){
^~~~
garden.cpp:52:4: error: 'adj' was not declared in this scope
adj[best[i][0]+N].push_back(i);
^~~
garden.cpp:55:4: error: 'adj' was not declared in this scope
adj[best[i][0]].push_back(i);
^~~
garden.cpp:56:6: error: 'best' was not declared in this scope
if(best[i][1]==-1)continue;
^~~~
garden.cpp:57:6: error: 'best' was not declared in this scope
if(best[best[i][1]][0]==i && best[best[i][0]][1]!=-1){
^~~~
garden.cpp:58:4: error: 'adj' was not declared in this scope
adj[best[i][1]+N].push_back(i+N);
^~~
garden.cpp:61:4: error: 'adj' was not declared in this scope
adj[best[i][1]].push_back(i+N);
^~~
garden.cpp:70:2: error: 'mark' was not declared in this scope
mark[0][P]=1;
^~~~
garden.cpp:73:2: error: 'dist' was not declared in this scope
dist[0][P]=0;
^~~~
garden.cpp:73:2: note: suggested alternative: 'int'
dist[0][P]=0;
^~~~
int
garden.cpp:81:3: error: 'printf' was not declared in this scope
printf("dist:%d %d\n", dist[0][i], dist[1][i]);
^~~~~~
garden.cpp:81:3: note: suggested alternative: 'int'
printf("dist:%d %d\n", dist[0][i], dist[1][i]);
^~~~~~
int
garden.cpp:84:4: error: 'cnt' was not declared in this scope
cnt[dist[0][i]]++;
^~~
garden.cpp:84:4: note: suggested alternative: 'int'
cnt[dist[0][i]]++;
^~~
int
garden.cpp:89:22: error: 'cnt' was not declared in this scope
printf("cnt:%d\n", cnt[i]);
^~~
garden.cpp:89:22: note: suggested alternative: 'int'
printf("cnt:%d\n", cnt[i]);
^~~
int
garden.cpp:89:3: error: 'printf' was not declared in this scope
printf("cnt:%d\n", cnt[i]);
^~~~~~
garden.cpp:89:3: note: suggested alternative: 'int'
printf("cnt:%d\n", cnt[i]);
^~~~~~
int
garden.cpp:91:2: error: 'cnt' was not declared in this scope
cnt[0]=1;
^~~
garden.cpp:91:2: note: suggested alternative: 'int'
cnt[0]=1;
^~~
int
garden.cpp:94:4: error: 'answer' was not declared in this scope
answer(cnt[G[i]]);
^~~~~~
garden.cpp:100:3: error: 'cumcnt' was not declared in this scope
cumcnt[i]=cnt[i];
^~~~~~
garden.cpp:106:11: error: 'cumcnt' was not declared in this scope
answer(cumcnt[ G[i]%cyclen+2*N-cyclen]);
^~~~~~
garden.cpp:106:4: error: 'answer' was not declared in this scope
answer(cumcnt[ G[i]%cyclen+2*N-cyclen]);
^~~~~~
garden.cpp:110:11: error: 'cumcnt' was not declared in this scope
answer(cumcnt[G[i]]);
^~~~~~
garden.cpp:110:4: error: 'answer' was not declared in this scope
answer(cumcnt[G[i]]);
^~~~~~