正文
增加 32 行删除 21 行
5 行未改动678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061625 行未改动- 空格换行自己输```cppnamespace Fast_read{// int -2147483648~2147483647// 如果输入输出会有 -2147483648 (2^31) 记得开 long long// 只输入大写字母或小写字母可以修改快读字符串// 空格换行自己输int op, stk[35], top = 0;char c;template <typename T>inline void read(T &w){w = 0, op = 1;do {c = getchar();}while ((c < '0' || c > '9') && c != '-');if (c == '-') op = -1, c = getchar();do {w = (w << 1) + (w << 3) + (c ^ 48), c = getchar();}while (c >= '0' && c <= '9');w *= op;}inline int read(){int w = 0;op = 1;do {c = getchar();}while ((c < '0' || c > '9') && c != '-');if (c == '-') op = -1, c = getchar();do {w = (w << 1) + (w << 3) + (c ^ 48), c = getchar();}while (c >= '0' && c <= '9');return w * op;}template <typename T>inline void print(T ans){top = 0;if (ans < 0) putchar('-'), ans = -ans;do {stk[ ++ top] = ans % 10, ans /= 10;}while (ans);while (top) putchar(stk[top -- ] ^ 48);}inline void read(char *s, int &len){do {c = getchar();}while ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z'));do {s[ ++ len] = c, c = getchar();}while ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));}inline void print(char *s, int &len){top = 0;do {putchar(s[ ++ top]);}while (top <= len);}}using namespace Fast_read;```5 行未改动6789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172735 行未改动- 空格换行自己输```cpp#include <iostream>#include <cstring>using namespace std;namespace Fast_read{// int -2147483648~2147483647// 如果输入输出会有 -2147483648 (2^31) 记得开 long long// 只输入大写字母或小写字母可以修改快读字符串// 空格换行自己输int Fop, Fstk[35], Ftop = 0;char Fc;template <typename T>inline void read(T &Fw){Fw = 0, Fop = 1;do {Fc = getchar();}while ((Fc < '0' || Fc > '9') && Fc != '-');if (Fc == '-') Fop = -1, Fc = getchar();do {Fw = (Fw << 1) + (Fw << 3) + (Fc ^ 48), Fc = getchar();}while (Fc >= '0' && Fc <= '9');Fw *= Fop;}inline int read(){int Fw = 0;Fop = 1;do {Fc = getchar();}while ((Fc < '0' || Fc > '9') && Fc != '-');if (Fc == '-') Fop = -1, Fc = getchar();do {Fw = (Fw << 1) + (Fw << 3) + (Fc ^ 48), Fc = getchar();}while (Fc >= '0' && Fc <= '9');return Fw * Fop;}template <typename T>inline void print(T ans){Ftop = 0;if (ans < 0) putchar('-'), ans = -ans;do {Fstk[ ++ Ftop] = ans % 10, ans /= 10;}while (ans);while (Ftop) putchar(Fstk[Ftop -- ] ^ 48);}inline void read(char *s, int &len){do {Fc = getchar();}while ((Fc < 'a' || Fc > 'z') && (Fc < 'A' || Fc > 'Z'));do {s[ ++ len] = Fc, Fc = getchar();}while ((Fc >= 'a' && Fc <= 'z') || (Fc >= 'A' && Fc <= 'Z'));}inline void print(char *s, int &len){Ftop = 0;do {putchar(s[ ++ Ftop]);}while (Ftop <= len);}inline void read(char *s, int &len){do {Fc = getchar();}while (Fc < '0' || Fc > '1');do {s[ ++ len] = Fc, Fc = getchar();}while (Fc == '0' || Fc == '1');}}using namespace Fast_read;```