ballmachine.cpp: In function 'int find_min_in_subtree(int)':
ballmachine.cpp:4:28: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ^
ballmachine.cpp:19:5: note: in expansion of macro 'rep'
19 | rep(i,0,kids[node].size()){
| ^~~
ballmachine.cpp:4:43: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ~~~~^~~~~
ballmachine.cpp:19:5: note: in expansion of macro 'rep'
19 | rep(i,0,kids[node].size()){
| ^~~
ballmachine.cpp: In function 'void order_dfs(int)':
ballmachine.cpp:4:28: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ^
ballmachine.cpp:38:9: note: in expansion of macro 'rep'
38 | rep(i,0,kids[node].size()){
| ^~~
ballmachine.cpp:4:43: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ~~~~^~~~~
ballmachine.cpp:38:9: note: in expansion of macro 'rep'
38 | rep(i,0,kids[node].size()){
| ^~~
ballmachine.cpp: In function 'void build_up(int)':
ballmachine.cpp:4:28: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ^
ballmachine.cpp:52:5: note: in expansion of macro 'rep'
52 | rep(i,1,up[node].size()){
| ^~~
ballmachine.cpp:4:43: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ~~~~^~~~~
ballmachine.cpp:52:5: note: in expansion of macro 'rep'
52 | rep(i,1,up[node].size()){
| ^~~
ballmachine.cpp:4:28: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ^
ballmachine.cpp:55:5: note: in expansion of macro 'rep'
55 | rep(i,0,kids[node].size()){
| ^~~
ballmachine.cpp:4:43: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ~~~~^~~~~
ballmachine.cpp:55:5: note: in expansion of macro 'rep'
55 | rep(i,0,kids[node].size()){
| ^~~
ballmachine.cpp: In function 'int main()':
ballmachine.cpp:4:28: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ^
ballmachine.cpp:66:5: note: in expansion of macro 'rep'
66 | rep(i,0,N){
| ^~~
ballmachine.cpp:4:28: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ^
ballmachine.cpp:98:5: note: in expansion of macro 'rep'
98 | rep(i,0,N){
| ^~~
ballmachine.cpp:4:28: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ^
ballmachine.cpp:101:13: note: in expansion of macro 'rep'
101 | rep(j,0,kids[i].size()){
| ^~~
ballmachine.cpp:4:43: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ~~~~^~~~~
ballmachine.cpp:101:13: note: in expansion of macro 'rep'
101 | rep(j,0,kids[i].size()){
| ^~~
ballmachine.cpp:4:28: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ^
ballmachine.cpp:106:13: note: in expansion of macro 'rep'
106 | rep(j,0,v.size()){
| ^~~
ballmachine.cpp:4:43: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ~~~~^~~~~
ballmachine.cpp:106:13: note: in expansion of macro 'rep'
106 | rep(j,0,v.size()){
| ^~~
ballmachine.cpp:4:28: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ^
ballmachine.cpp:122:5: note: in expansion of macro 'rep'
122 | rep(i,0,N){
| ^~~
ballmachine.cpp:4:28: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ^
ballmachine.cpp:141:5: note: in expansion of macro 'rep'
141 | rep(i,0,Q){
| ^~~
ballmachine.cpp:4:28: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
4 | #define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
| ^
ballmachine.cpp:144:13: note: in expansion of macro 'rep'
144 | rep(j,0,k){
| ^~~
ballmachine.cpp:170:42: warning: 'root' may be used uninitialized in this function [-Wmaybe-uninitialized]
170 | if(!taken[up[at][0]] || at==root) break;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~