读入优化
int read()
{
char c;int ff=;
while((c=getchar())<''||c>'')
if(c=='-')ff=-;
int num=c-'';
while((c=getchar())>=''&&c<='')
num=num*+c-'';
return ff*num;
}
输出优化
void write(int x)
{
if(x<)
{
putchar('-');
x=-x;
}
if(x>)write(x/);
putchar(x%+'');
}