teams.cpp: In function 'void build(int, int, int)':
teams.cpp:24:31: warning: declaration of 'n' shadows a global declaration [-Wshadow]
void build(int n,int s , int e){
^
teams.cpp:21:14: note: shadowed declaration is here
int idx[nax],n,cnt,k,l,r;
^
teams.cpp: In function 'int update(int, int, int, int)':
teams.cpp:35:40: warning: declaration of 'n' shadows a global declaration [-Wshadow]
int update(int n , int s , int e,int at){
^
teams.cpp:21:14: note: shadowed declaration is here
int idx[nax],n,cnt,k,l,r;
^
teams.cpp: In function 'int get(int, int, int)':
teams.cpp:73:26: warning: declaration of 'n' shadows a global declaration [-Wshadow]
int get(int n,int s,int e){
^
teams.cpp:21:14: note: shadowed declaration is here
int idx[nax],n,cnt,k,l,r;
^
teams.cpp: In function 'int can(int, int*)':
teams.cpp:109:68: warning: conversion to 'int' from '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >::difference_type {aka long int}' may alter its value [-Wconversion]
int st = upper_bound(p.begin(),p.end(),make_pair(K[i],(int)1e9)) - p.begin();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/cassert:44:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:33,
from teams.cpp:2:
teams.cpp:110:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert(st <= p.size());
~~~^~~~~~~~~~~
teams.cpp:106:6: warning: variable 'lst' set but not used [-Wunused-but-set-variable]
int lst = -1;
^~~