teams.cpp: In member function 'long long int segtree::build(int, int)':
teams.cpp:33:20: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
33 | int mm = l + r >> 1;
| ~~^~~
teams.cpp:34:20: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
34 | x.l = build(l, mm), x.r = build(mm + 1, r);
| ~~~~~^~~~~~~
teams.cpp:34:40: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
34 | x.l = build(l, mm), x.r = build(mm + 1, r);
| ~~~~~^~~~~~~~~~~
teams.cpp: In member function 'long long int segtree::ins(int, int, int, int)':
teams.cpp:44:20: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
44 | int mm = l + r >> 1;
| ~~^~~
teams.cpp:46:22: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
46 | x.l = ins(x.l, l, mm, p);
| ~~~^~~~~~~~~~~~~~~
teams.cpp:49:22: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
49 | x.r = ins(x.r, mm + 1, r, p);
| ~~~^~~~~~~~~~~~~~~~~~~
teams.cpp: In member function 'long long int segtree::kth(int, int, int, int, int)':
teams.cpp:58:20: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
58 | int mm = l + r >> 1;
| ~~^~~
teams.cpp:61:53: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
61 | return kth(seg[v].l, seg[u].l, l, mm, k - cc);
| ~~^~~~
teams.cpp: In member function 'long long int segtree::bs(int, int, int, int, int)':
teams.cpp:71:20: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
71 | int mm = l + r >> 1;
| ~~^~~
teams.cpp: In function 'void init(int, int*, int*)':
teams.cpp:83:21: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
83 | rt[0] = tr.build(1, n);
| ~~~~~~~~^~~~~~
teams.cpp: In function 'int can(int, int*)':
teams.cpp:107:74: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
107 | ll tot = (ll)st.back()[2] + tr.bs(rt[i], rt[st.back()[0]], 1, n, i) - i;
| ^
teams.cpp:111:60: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
111 | ll cur = tr.kth(rt[i], rt[st.back()[0]], 1, n, tot - st.back()[2]);
teams.cpp:114:61: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
114 | cur = tr.kth(rt[i], rt[st.back()[0]], 1, n, tot - st.back()[2]);