teams.cpp: In constructor 'Node::Node(int, int, int)':
teams.cpp:21:30: warning: declaration of 'val' shadows a member of 'Node' [-Wshadow]
Node(int l, int r, int val) : l(l), r(r), val(val) {}
^
teams.cpp:20:12: note: shadowed declaration is here
int l, r, val;
^~~
teams.cpp:21:30: warning: declaration of 'r' shadows a member of 'Node' [-Wshadow]
Node(int l, int r, int val) : l(l), r(r), val(val) {}
^
teams.cpp:20:9: note: shadowed declaration is here
int l, r, val;
^
teams.cpp:21:30: warning: declaration of 'l' shadows a member of 'Node' [-Wshadow]
Node(int l, int r, int val) : l(l), r(r), val(val) {}
^
teams.cpp:20:6: note: shadowed declaration is here
int l, r, val;
^
teams.cpp: In function 'void expand_tree(int, int, int, int, int)':
teams.cpp:32:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int m = s + e >> 1;
~~^~~
teams.cpp:35:26: warning: conversion to 'int' from 'std::vector<Node>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
tree[cnd].l = tree.size();
~~~~~~~~~^~
teams.cpp:41:26: warning: conversion to 'int' from 'std::vector<Node>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
tree[cnd].r = tree.size();
~~~~~~~~~^~
teams.cpp: In function 'void init(int, int*, int*)':
teams.cpp:66:24: warning: conversion to 'int' from 'std::vector<Node>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
root[i+1] = tree.size();
~~~~~~~~~^~
teams.cpp: In function 'int cal(int, int, int, int, int, int)':
teams.cpp:76:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int m = s + e >> 1;
~~^~~
teams.cpp: In function 'int get_r(int, int, int, int, int)':
teams.cpp:83:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int m = s + e >> 1, lcnt = tree[tree[cnd].l].val - tree[tree[pnd].l].val;
~~^~~
teams.cpp: In function 'int can(int, int*)':
teams.cpp:97:56: warning: conversion to 'int' from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type {aka long int}' may alter its value [-Wconversion]
int last = lower_bound(all(num), K[i]) - num.begin() + 1, cnt = K[i];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
teams.cpp:98:41: warning: conversion to 'int' from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type {aka long int}' may alter its value [-Wconversion]
int rx = upper_bound(all(numx), K[i]) - numx.begin();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
teams.cpp:102:8: warning: declaration of 'temp' shadows a previous local [-Wshadow]
int temp = cal(1, n, last, y, root[x], root[rx]);
^~~~
teams.cpp:89:5: note: shadowed declaration is here
ll temp = 0;
^~~~