一、血妈快读
readi和readu分别读取有符号和无符号整数。
需要头文件 cctype 。
template<class _Ty> inline void readi(_Ty& x) {
static _Ty c, s; x = 0, s = 1;
c = getchar();
if (c == '-')s = -1;
else x = x * 10 + c - '0';
for (;;) {
c = getchar();
if (!isdigit(c))break;
x = x * 10 + c - '0';
}
x *= s;
}
template<class _Ty> inline void readu(_Ty& x) {
static _Ty c; x = 0;
for (;;) {
c = getchar();
if (!isdigit(c))return;
x = x