void nextInt(int &x) {//读取一个整型 char c; do c=getchar(); while (c<'0'||c>'9'); x=c-'0'; while ('0'<=(c=getchar())&&c<='9') x=x*10+c-'0'; }