train.cpp: In function 'std::vector<int> who_wins(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
train.cpp:24:33: error: invalid types 'std::map<int, int>::mapped_type {aka int}[__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}]' for array subscript
24 | e[u[i]].pb(v[i]), M[u[i]][v[i]]=1;
| ^
train.cpp:31:14: error: invalid types 'std::map<int, int>::mapped_type {aka int}[int]' for array subscript
31 | if(M[i][i+1]])
| ^
train.cpp:31:15: error: expected ')' before ']' token
31 | if(M[i][i+1]])
| ~ ^
| )
train.cpp:31:15: error: expected primary-expression before ']' token