void read(int& x) //isdigit头文件 cctype { int f = 1; x = 0; char ch = getchar(); while(!isdigit(ch)) { if(ch == '-1') f = -1; ch = getchar(); } while(isdigit(ch)) { x = x * 10 + ch - '0'; ch = getchar(); } x *= f; }