rt。总是会RE or WA 1~2个点,求解。
const int BUF_SIZE=1<<20;
struct FastIO{
char ibuf[BUF_SIZE],obuf[BUF_SIZE];
char *ip,*op;
FastIO():ip(ibuf),op(obuf){
fread(ibuf,1,BUF_SIZE,stdin);
}
~FastIO(){
fwrite(obuf,1,op-obuf,stdout);
}
int read(){
while(*ip<'0'&&*ip!='-')++ip;
bool f=false;
if(*ip=='-'){
f=true;
++ip;
}
int x=0;
while(*ip>='0'&&*ip<='9'){
x=x*10+(*ip++-'0');
}
return f?-x:x;
}
long long readll() {
while(*ip<'0'&&*ip!='-')++ip;
bool f=false;
if(*ip=='-'){
f=true;
++ip;
}
long long x=0;
while(*ip>='0'&&*ip<='9'){
x=x*10+(*ip++-'0');
}
return f?-x:x;
}
void write(int x){
if(x>9)write(x/10);
*op++=x%10+'0';
}
void write(const char* s){
while(*s)*op++=*s++;
}
void write(long long x){
if(x>9)write(x/10);
*op++=x%10+'0';
}
}io;