teams.cpp: In constructor 'node::node(int)':
teams.cpp:25:6: warning: 'node::sum' will be initialized after [-Wreorder]
25 | int sum;
| ^~~
teams.cpp:24:8: warning: 'node* node::lc' [-Wreorder]
24 | node *lc, *rc;
| ^~
teams.cpp:26:2: warning: when initialized here [-Wreorder]
26 | node(int _sum = 0): sum(_sum), lc(nullptr), rc(nullptr){};
| ^~~~
teams.cpp: In member function 'void node::upd(node&, int, int, int)':
teams.cpp:35:31: warning: declaration of 'pos' shadows a global declaration [-Wshadow]
35 | void upd(node &old_tree, int pos, int l = 1, int r = n){
| ~~~~^~~
teams.cpp:17:13: note: shadowed declaration is here
17 | vector<int> pos[maxn];
| ^~~
teams.cpp: In member function 'int node::query(int, int, int)':
teams.cpp:50:16: warning: declaration of 'pos' shadows a global declaration [-Wshadow]
50 | int query(int pos, int l = 1, int r = n){
| ~~~~^~~
teams.cpp:17:13: note: shadowed declaration is here
17 | vector<int> pos[maxn];
| ^~~
teams.cpp: In function 'int gt_gap(int, int)':
teams.cpp:68:9: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
68 | if(r-l < precalc[l].size())return precalc[l][r-l];
| ~~~~^~~~~~~~~~~~~~~~~~~
teams.cpp: In function 'void init(int, int*, int*)':
teams.cpp:95:75: warning: conversion from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type' {aka 'long int'} to 'int' may change value [-Wconversion]
95 | crr += pos[i+j].end() - lower_bound(pos[i+j].begin(), pos[i+j].end(), i);
| ^
teams.cpp:110:23: warning: conversion from 'std::vector<node>::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
110 | rtpos[i] = rt.size()-1;
| ~~~~~~~~~^~
teams.cpp:114:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
114 | for(int j = 1; j < FW[i].size(); j++)FW[i][j] += FW[i][j-1];
| ~~^~~~~~~~~~~~~~
teams.cpp: In function 'int can(int, int*)':
teams.cpp:128:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
128 | for(int i = 0; i < vec.size(); i++){
| ~~^~~~~~~~~~~~