IO 发表于 2019-04-03 | 更新于 2019-05-07 | 阅读次数: 读优输优 fread12345678910const int L=1000000;char *p1,*p2,ppp[L];inline char gc(){ if(p1==p2) { p2=(p1=ppp)+fread(ppp,1,L,stdin); } return *p1++;} 读优输优123456789101112131415161718192021222324252627282930313233343536373839404142434445void read(int &x){ x=0; char ch=getchar(); int pd=1; while(ch<'0'||ch>'9') { if(ch=='-') { pd=-pd; } ch=getchar(); } while(ch<='9'&&ch>='0') { x=x*10+ch-'0'; ch=getchar(); } x*=pd;}void write(const int &x){ char f[100001]; int s=0; int tmp=x; if(tmp==0) { putchar('0'); return; } if(tmp<0) { tmp=-tmp; putchar('-'); } while(tmp>0) { f[s++]=tmp%10+'0'; tmp/=10; } while(s>0) { putchar(f[--s]); }}