bzoj4127.cc
#include #include #include #include using namespace std; const int buf_len = 45678; char buf[buf_len], *bufb(buf), *bufe(buf + 1); #define readBuf() { if (++ bufb == bufe) bufe = (bufb = buf) + fread(buf, 1, sizeof(buf), stdin); } #define readInt(x) { register int s(0), neg(0); while (!isdigit(*bufb)) { if (*bufb == ‘-’) neg = 1; readBuf(); } do { s = s * 10 + *bufb - 48; readBuf(); } while (isdigit(*bufb)); if (neg) x = -s; else x = s; }...