本文最后更新于 2024-10-22T11:39:17+00:00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| #define New int inline New read() { New X = 0, w = 0; char ch = 0; while (!isdigit(ch)) { w |= ch == '-'; ch = getchar(); } while (isdigit(ch)) { X = (X << 3) + (X << 1) + (ch ^ 48); ch = getchar(); } return w ? -X : X; } char F[200]; inline void write(New x) { if (x == 0) { putchar('0'); return; } New tmp = x > 0 ? x : -x; int cnt = 0; if (x < 0) putchar('-'); while (tmp > 0) { F[cnt++] = tmp % 10 + '0'; tmp /= 10; } while (cnt > 0) putchar(F[--cnt]); }
|
快速读入模板
http://hexo.zhywyt.me/posts/49493/