train.cpp: In function 'std::vector<int> bfs(std::vector<int>&, std::vector<int>&, int)':
train.cpp:30:16: error: 'i' was not declared in this scope
30 | q.push(i);
| ^
train.cpp: In function 'std::vector<int> who_wins(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
train.cpp:53:9: error: 'calc' was not declared in this scope
53 | R = calc(a,R,1);
| ^~~~
train.cpp:54:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
54 | if(R.size() == alive){
| ~~~~~~~~~^~~~~~~~
train.cpp:64:22: error: expected ';' before '<' token
64 | for(int i = 0,i<n;++i){
| ^
| ;
train.cpp:64:22: error: expected primary-expression before '<' token
train.cpp:69:13: error: 'i' was not declared in this scope
69 | exc[i] = 1;
| ^
train.cpp:68:16: warning: unused variable 'x' [-Wunused-variable]
68 | for(auto x : R){
| ^