#include #define int long long #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() using namespace std; templateistream&operator>>(istream&I,vector&v){for(auto&i:v)I>>i;return I;} templateostream&operator<<(ostream&O,vector&v){for(auto&i:v)O<>N>>Q; for(int i=0;ilis; for(int i=0;i>c>>k; if(c=='x'||c=='y'){ k++; if(c=='x')scanf("%lld",&X[k]); else scanf("%lld",&Y[k]); if(!ex[k])lis.insert(lower_bound(all(lis),k),k); ex[k]=true; continue; } int a=1; for(int j=0;j>t; while(t--)AC::solve(); }