teams.cpp: In function 'int ch(int, int)':
teams.cpp:13:41: warning: conversion to 'int' from 'long int' may alter its value [-Wconversion]
int ans=0, l=lower_bound(a, a+n, ta)-a, r=n;
~~~~~~~~~~~~~~~~~~~~~~~^~
teams.cpp:15:86: warning: conversion to 'int' from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type {aka long int}' may alter its value [-Wconversion]
if(l&1) ans+=lower_bound(tree[l].begin(), tree[l].end(), tb)-tree[l++].begin();
^
teams.cpp:15:76: warning: operation on 'l' may be undefined [-Wsequence-point]
if(l&1) ans+=lower_bound(tree[l].begin(), tree[l].end(), tb)-tree[l++].begin();
~^~
teams.cpp:16:86: warning: conversion to 'int' from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type {aka long int}' may alter its value [-Wconversion]
if(r&1) ans+=lower_bound(tree[--r].begin(), tree[r].end(), tb)-tree[r].begin();
^
teams.cpp:16:39: warning: operation on 'r' may be undefined [-Wsequence-point]
if(r&1) ans+=lower_bound(tree[--r].begin(), tree[r].end(), tb)-tree[r].begin();
^~~
teams.cpp: In function 'void init(int, int*, int*)':
teams.cpp:2:23: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
#define loop(i, a, b) for(long long i=a;i<b;i++)
^
teams.cpp:23:5: note: in expansion of macro 'loop'
loop(i, 0, n) arr[i].first=a[i],arr[i].second=b[i];sort(arr, arr+n);
^~~~
teams.cpp:23:56: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
loop(i, 0, n) arr[i].first=a[i],arr[i].second=b[i];sort(arr, arr+n);
^~~~
teams.cpp:25:30: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
loop(i, 0, n) for(int j=i+n;j>0;j>>=1) tree[j].push_back(arr[i].second);
~^~
teams.cpp: In function 'int can(int, int*)':
teams.cpp:34:40: warning: conversion to 'int' from 'long int' may alter its value [-Wconversion]
int st=lower_bound(a, a+n,c[i])-upper_bound(a, a+n,c[i-1]);
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
teams.cpp:35:40: warning: conversion to 'int' from 'long int' may alter its value [-Wconversion]
int en=upper_bound(b, b+n,c[i])-lower_bound(b, b+n,c[i-1]);
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~