https://www.luogu.com.cn/discuss/562021 该帖无快读快出950ms
加了快读快出后还能优化60ms,意味着还要卡110ms
所以申请加强数据
加的快读快出如下:
#define getchar() (strto1==strto2&&(strto2=(strto1=fsr)+fread(fsr,1,1<<15,stdin),strto1==strto2)?EOF:*strto1++)
char fsr[1<<15],*strto1=fsr,*strto2=fsr;
inline int read()
{
int s=0,w=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
while(ch>='0'&&ch<='9')s=(s<<1)+(s<<3)+(ch^48),ch=getchar();
return s*w;
}
inline void write(int x)
{
if(x<0) putchar('-'),x=-x;
if(x>9) write(x/10);
putchar(x%10+'0');
}