快读
inline int read(){ int x=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){ if(ch=='-') f=-1; ch=getchar(); } while(ch>='0'&&ch<='9'){ x=(x<<1)+(x<<3)+(ch^48); ch=getchar(); } return x*f; }
#define gc (p1==p2&&(p2=(p1=fr)+fread(fr,1,1<<21,stdin))==p1?EOF:*p1++) char ch,fr[1<<21],*p1=fr,*p2=fr; bool fig; void rd(int&x) { while(!isdigit(ch=gc)&&ch^45); if(fig=ch==45)ch=gc; x=ch-48; while( isdigit(ch=gc)) x=ch-48+x*10; if(fig) x=-x; }
快写
inline void write(int x) { char F[200]; int tmp=x>0?x:-x ; if(x<0)putchar('-') ; int cnt=0 ; while(tmp>0) { F[cnt++]=tmp%10+'0'; tmp/=10; } while(cnt>0)putchar(F[--cnt]) ; }