这是我的代码:
class QIO {
public:
QIO() {}
~QIO() {}
char buf[1 << 21], * p1 = buf, * p2 = buf;
int getc() {
return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2) ? EOF : *p1++;
}
int read() {
int ret = 0, f = 0;
char ch = getc();
while (!isdigit(ch)) {
if (ch == '-')
f = 1;
ch = getc();
}
while (isdigit(ch)) {
ret = ret * 10 + ch - 48;
ch = getc();
}
return f ? -ret : ret;
}
char Buf[1 << 21], out[20];
int P, Size = -1;
void flush() {
fwrite(Buf, 1, Size + 1, stdout);
Size = -1;
}
void write(int x, char ch) {
if (Size > 1) flush();
if (x < 0) Buf[++Size] = 45, x = -x;
do {
out[++P] = x % 10 + 48;
} while (x /= 10);
do {
Buf[++Size] = out[P];
} while (--P);
Buf[++Size] = ch;
}
} io;
然而输入不进去……求助