int scan(int &x){
    while(c=getchar(),c<'0'||c>'9');x=c-'0';
    while(c=getchar(),c>='0'&&c<='9')x=x*10+c-'0';
}

相关文章: