train.cpp: In function 'void dfs(int, int)':
train.cpp:9:2: error: 'vis' was not declared in this scope
9 | vis[num][v] = 1;
| ^~~
train.cpp:11:3: error: expected identifier before 'if'
11 | if(!vis[nun][u]){
| ^~
train.cpp: In lambda function:
train.cpp:15:1: error: expected '{' before '}' token
15 | }
| ^
train.cpp: In function 'void dfs(int, int)':
train.cpp:14:3: error: expected ';' before '}' token
14 | ]
| ^
| ;
15 | }
| ~
train.cpp:10:11: warning: unused variable 'u' [-Wunused-variable]
10 | for(auto u:adj[v])[
| ^
train.cpp: In function 'std::vector<int> who_wins(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
train.cpp:20:3: error: 'ad' was not declared in this scope; did you mean 'a'?
20 | ad[u].push_back(v);
| ^~
| a
train.cpp:28:15: error: no match for 'operator[]' (operand types are 'int [5005]' and 'std::vector<int>')
28 | if(path[u][v]){
| ^