swap.cpp: In function 'int getMinimumFuelCapacity(int, int)':
swap.cpp:67:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
67 | int mid = l + r >> 1;
| ~~^~~
swap.cpp: At global scope:
swap.cpp:85:11: error: redefinition of 'const int N'
85 | const int N = 1e5 + 10,
| ^
swap.cpp:7:11: note: 'const int N' previously defined here
7 | const int N = 1e5 + 10,
| ^
swap.cpp:86:11: error: redefinition of 'const int M'
86 | M = 1e3 + 10;
| ^
swap.cpp:8:11: note: 'const int M' previously defined here
8 | M = 1e3 + 10;
| ^
swap.cpp:87:5: error: redefinition of 'int n'
87 | int n, m;
| ^
swap.cpp:9:5: note: 'int n' previously declared here
9 | int n, m;
| ^
swap.cpp:87:8: error: redefinition of 'int m'
87 | int n, m;
| ^
swap.cpp:9:8: note: 'int m' previously declared here
9 | int n, m;
| ^
swap.cpp:88:24: error: redefinition of 'std::vector<std::pair<int, int> > ad [100010]'
88 | vector<pair<int, int>> ad[N];
| ^~
swap.cpp:10:24: note: 'std::vector<std::pair<int, int> > ad [100010]' previously declared here
10 | vector<pair<int, int>> ad[N];
| ^~
swap.cpp:90:6: error: redefinition of 'bool chain'
90 | bool chain;
| ^~~~~
swap.cpp:12:6: note: 'bool chain' previously declared here
12 | bool chain;
| ^~~~~
swap.cpp:91:13: error: redefinition of 'std::vector<int> co'
91 | vector<int> co;
| ^~
swap.cpp:13:13: note: 'std::vector<int> co' previously declared here
13 | vector<int> co;
| ^~
swap.cpp:92:6: error: redefinition of 'void init(int, int, std::vector<int>, std::vector<int>, std::vector<int>)'
92 | void init(int N, int M, vector<int> U, vector<int> V, vector<int> W) {
| ^~~~
swap.cpp:14:6: note: 'void init(int, int, std::vector<int>, std::vector<int>, std::vector<int>)' previously defined here
14 | void init(int N, int M, vector<int> U, vector<int> V, vector<int> W) {
| ^~~~
swap.cpp:108:6: error: redefinition of 'bool dd [100010]'
108 | bool dd[N];
| ^~
swap.cpp:30:6: note: 'bool dd [100010]' previously declared here
30 | bool dd[N];
| ^~
swap.cpp:109:5: error: redefinition of 'int special'
109 | int special;
| ^~~~~~~
swap.cpp:31:5: note: 'int special' previously declared here
31 | int special;
| ^~~~~~~
swap.cpp:110:6: error: redefinition of 'bool dfs1(int, int, int)'
110 | bool dfs1(int u, int pre, int cw) {
| ^~~~
swap.cpp:32:6: note: 'bool dfs1(int, int, int)' previously defined here
32 | bool dfs1(int u, int pre, int cw) {
| ^~~~
swap.cpp:124:6: error: redefinition of 'bool dfs2(int, int, int)'
124 | bool dfs2(int u, int pre, int cw) {
| ^~~~
swap.cpp:46:6: note: 'bool dfs2(int, int, int)' previously defined here
46 | bool dfs2(int u, int pre, int cw) {
| ^~~~
swap.cpp:138:5: error: redefinition of 'int getMinimumFuelCapacity(int, int)'
138 | int getMinimumFuelCapacity(int X, int Y) {
| ^~~~~~~~~~~~~~~~~~~~~~
swap.cpp:60:5: note: 'int getMinimumFuelCapacity(int, int)' previously defined here
60 | int getMinimumFuelCapacity(int X, int Y) {
| ^~~~~~~~~~~~~~~~~~~~~~
swap.cpp: In function 'int getMinimumFuelCapacity(int, int)':
swap.cpp:145:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
145 | int mid = l + r >> 1;
| ~~^~~