swap.cpp:6:1: error: 'vector' does not name a type
6 | vector<pair<int, int> > g[N];
| ^~~~~~
swap.cpp: In function 'void init(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
swap.cpp:16:3: error: 'g' was not declared in this scope
16 | g[u].pb({v, w});
| ^
swap.cpp:18:8: error: 'max' was not declared in this scope; did you mean 'std::max'?
18 | mx = max(mx, w);
| ^~~
| std::max
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from swap.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: 'std::max' declared here
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~