riggedroads.cpp:277:10: error: redefinition of 'template<class X, class Y> bool maximize(X&, const Y&)'
277 | bool maximize(X &x, const Y &y) {
| ^~~~~~~~
riggedroads.cpp:65:10: note: 'template<class X, class Y> bool maximize(X&, const Y&)' previously declared here
65 | bool maximize(X &x, const Y &y) {
| ^~~~~~~~
riggedroads.cpp:286:10: error: redefinition of 'template<class X, class Y> bool minimize(X&, Y)'
286 | bool minimize(X &x, Y y) {
| ^~~~~~~~
riggedroads.cpp:74:10: note: 'template<class X, class Y> bool minimize(X&, Y)' previously declared here
74 | bool minimize(X &x, Y y) {
| ^~~~~~~~
riggedroads.cpp:294:11: error: redefinition of 'const int nmax'
294 | const int nmax = 3e5 + 5;
| ^~~~
riggedroads.cpp:82:11: note: 'const int nmax' previously defined here
82 | const int nmax = 3e5 + 5;
| ^~~~
riggedroads.cpp:295:10: error: redefinition of 'const long long int mod'
295 | const ll mod = 1e9 + 7;
| ^~~
riggedroads.cpp:83:10: note: 'const long long int mod' previously defined here
83 | const ll mod = 1e9 + 7;
| ^~~
riggedroads.cpp:296:10: error: redefinition of 'const long long int inf'
296 | const ll inf = 1e18;
| ^~~
riggedroads.cpp:84:10: note: 'const long long int inf' previously defined here
84 | const ll inf = 1e18;
| ^~~
riggedroads.cpp:298:12: error: redefinition of 'std::mt19937_64 rng'
298 | mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
| ^~~
riggedroads.cpp:86:12: note: 'std::mt19937_64 rng' previously declared here
86 | mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
| ^~~
riggedroads.cpp:299:4: error: redefinition of 'long long int rngesus(long long int, long long int)'
299 | ll rngesus(ll l, ll r) {
| ^~~~~~~
riggedroads.cpp:87:4: note: 'long long int rngesus(long long int, long long int)' previously defined here
87 | ll rngesus(ll l, ll r) {
| ^~~~~~~
riggedroads.cpp:305:5: error: redefinition of 'int n'
305 | int n, m, u, v, r[nmax];
| ^
riggedroads.cpp:93:5: note: 'int n' previously declared here
93 | int n, m, u, v, r[nmax];
| ^
riggedroads.cpp:305:8: error: redefinition of 'int m'
305 | int n, m, u, v, r[nmax];
| ^
riggedroads.cpp:93:8: note: 'int m' previously declared here
93 | int n, m, u, v, r[nmax];
| ^
riggedroads.cpp:305:11: error: redefinition of 'int u'
305 | int n, m, u, v, r[nmax];
| ^
riggedroads.cpp:93:11: note: 'int u' previously declared here
93 | int n, m, u, v, r[nmax];
| ^
riggedroads.cpp:305:14: error: redefinition of 'int v'
305 | int n, m, u, v, r[nmax];
| ^
riggedroads.cpp:93:14: note: 'int v' previously declared here
93 | int n, m, u, v, r[nmax];
| ^
riggedroads.cpp:305:17: error: redefinition of 'int r [300005]'
305 | int n, m, u, v, r[nmax];
| ^
riggedroads.cpp:93:17: note: 'int r [300005]' previously declared here
93 | int n, m, u, v, r[nmax];
| ^
riggedroads.cpp:306:5: error: redefinition of 'std::pair<int, int> edges [300005]'
306 | pii edges[nmax];
| ^~~~~
riggedroads.cpp:94:5: note: 'std::pair<int, int> edges [300005]' previously defined here
94 | pii edges[nmax];
| ^~~~~
riggedroads.cpp:308:14: error: redefinition of 'std::vector<std::pair<int, int> > adj [300005]'
308 | vector <pii> adj[nmax];
| ^~~
riggedroads.cpp:96:14: note: 'std::vector<std::pair<int, int> > adj [300005]' previously declared here
96 | vector <pii> adj[nmax];
| ^~~
riggedroads.cpp:310:5: error: redefinition of 'int a [300005]'
310 | int a[nmax], cnt = 1;
| ^
riggedroads.cpp:98:5: note: 'int a [300005]' previously declared here
98 | int a[nmax], cnt = 1;
| ^
riggedroads.cpp:310:14: error: redefinition of 'int cnt'
310 | int a[nmax], cnt = 1;
| ^~~
riggedroads.cpp:98:14: note: 'int cnt' previously defined here
98 | int a[nmax], cnt = 1;
| ^~~
riggedroads.cpp:312:5: error: redefinition of 'int h [300005]'
312 | int h[nmax], id[nmax];
| ^
riggedroads.cpp:100:5: note: 'int h [300005]' previously declared here
100 | int h[nmax], id[nmax];
| ^
riggedroads.cpp:312:14: error: redefinition of 'int id [300005]'
312 | int h[nmax], id[nmax];
| ^~
riggedroads.cpp:100:14: note: 'int id [300005]' previously declared here
100 | int h[nmax], id[nmax];
| ^~
riggedroads.cpp:313:5: error: redefinition of 'int up [300005][20]'
313 | int up[nmax][20];
| ^~
riggedroads.cpp:101:5: note: 'int up [300005][20]' previously declared here
101 | int up[nmax][20];
| ^~
riggedroads.cpp:315:6: error: redefinition of 'void dfs(int, int)'
315 | void dfs(int u, int p) {
| ^~~
riggedroads.cpp:103:6: note: 'void dfs(int, int)' previously defined here
103 | void dfs(int u, int p) {
| ^~~
riggedroads.cpp:332:5: error: redefinition of 'int query_lca(int, int)'
332 | int query_lca(int u, int v) {
| ^~~~~~~~~
riggedroads.cpp:120:5: note: 'int query_lca(int, int)' previously defined here
120 | int query_lca(int u, int v) {
| ^~~~~~~~~
riggedroads.cpp:353:5: error: redefinition of 'int par [300005]'
353 | int par[nmax];
| ^~~
riggedroads.cpp:141:5: note: 'int par [300005]' previously declared here
141 | int par[nmax];
| ^~~
riggedroads.cpp:355:5: error: redefinition of 'int find(int)'
355 | int find(int x) {
| ^~~~
riggedroads.cpp:143:5: note: 'int find(int)' previously defined here
143 | int find(int x) {
| ^~~~
riggedroads.cpp:360:6: error: redefinition of 'void unite(int, int)'
360 | void unite(int x, int y) {
| ^~~~~
riggedroads.cpp:148:6: note: 'void unite(int, int)' previously defined here
148 | void unite(int x, int y) {
| ^~~~~
riggedroads.cpp:368:6: error: redefinition of 'bool check(int, int)'
368 | bool check(int x, int y) {
| ^~~~~
riggedroads.cpp:156:6: note: 'bool check(int, int)' previously defined here
156 | bool check(int x, int y) {
| ^~~~~
riggedroads.cpp:372:11: error: redefinition of 'std::set<int> tmp'
372 | set <int> tmp;
| ^~~
riggedroads.cpp:160:11: note: 'std::set<int> tmp' previously declared here
160 | set <int> tmp;
| ^~~
riggedroads.cpp:373:6: error: redefinition of 'void get(int, int)'
373 | void get(int u, int anc) {
| ^~~
riggedroads.cpp:161:6: note: 'void get(int, int)' previously defined here
161 | void get(int u, int anc) {
| ^~~
riggedroads.cpp:381:5: error: redefinition of 'int main()'
381 | int main() {
| ^~~~
riggedroads.cpp:169:5: note: 'int main()' previously defined here
169 | int main() {
| ^~~~