Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include<iostream>#include<algorithm>#include<cstdio>#include<cstring>#include<cmath>#include<stack>#include<queue>#include<map>#include<vector>#include<set>#define ls k<<1,l,mid#define rs k<<1|1,mid+1,r#define r(x) read(x)#define rrr(x,y,z) read(x);read(y);read(z)#define mp(x,y) make_pair(x,y)using namespace std;typedef long long LL;const int N=1e5+5;const int M=1e3+5;const int mod=1e9+7;const int inf=0x7fffffff;const double pi=acos(-1);const double eps=1e-8;template<class T>inline void read(T &x){char c;x=1;while((c=getchar())<'0'||c>'9') if(c=='-') x=-1;T res=c-'0';while((c=getchar())>='0'&&c<='9') res=res*10+c-'0';x*=res;