//#pragma comment(linker, "/STACK:102400000,102400000") c++扩栈/* int __size__ = 256 << 20;//256 兆 char * __p__ = (char *)malloc(__size__) + __size__; __asm__("movl %0,%%esp\n"::"r"(__p__));*/ /*inline bool scanf_(int &ret) { char c; int sgn; if (c = getchar(), c == EOF) return 0; //EOF while (c != '-' && (c<'0' || c>'9')) c = getchar(); sgn = (c == '-') ? -1 : 1; ret = (c == '-') ? 0 : (c - '0'); while (c = getchar(), c >= '0'&&c <= '9') ret = ret * 10 + (c - '0'); ret *= sgn; return 1;}inline void printf_(int x) { if (x>9) printf_(x / 10); putchar(x % 10 + '0');}*/ //没处理负数的输入输出挂
void Read(int &digit){ digit = 0; char c; for (c = getchar(); (c<'0' || c>'9') && c != '-'; c = getchar()); bool type = false; if (c == '-') type = true, c = getchar(); for (; c >= '0' && c <= '9'; digit = digit * 10 + c - '0', c = getchar()); if (type == true) digit = -digit;}//有负数