@@ -24,34 +24,73 @@ data:
2424 \ return;\n }\n\n file_size = st.st_size;\n data = reinterpret_cast<char\
2525 \ *>(\n mmap(nullptr, file_size, PROT_READ, MAP_PRIVATE, 0, 0));\n pos\
2626 \ = data;\n }\n\n ~FastReadMMap() {\n if (file_size != std::numeric_limits<size_t>::max())\n \
27- \ munmap(data, file_size);\n }\n\n char getchar() {\n return static_cast<size_t>(pos\
28- \ - data) < file_size ? *pos++ : EOF;\n }\n\n char operator()() { return getchar();\
29- \ }\n };\n\n template <size_t buffer_size = 1 << 20> struct FastWriteFWrite {\n \
30- \ char buffer[buffer_size], *pos = buffer;\n\n FastWriteFWrite() = default;\n \
31- \ ~FastWriteFWrite() { flush(); }\n\n FastWriteFWrite(const FastWriteFWrite\
32- \ &) = delete;\n FastWriteFWrite &operator=(const FastWriteFWrite &) = delete;\n \
33- \n void putchar(char c) {\n if (pos - buffer == buffer_size)\n flush();\n \
34- \ *pos++ = c;\n }\n\n void flush() {\n size_t write_size = pos - buffer;\n \
35- \ if (write_size) {\n fwrite(buffer, 1, write_size, stdout);\n pos\
36- \ = buffer;\n }\n }\n\n void operator()(char c) { putchar(c); }\n };\n\n template\
37- \ <typename Reader, typename Writer> struct FastIO {\n Reader reader;\n Writer\
38- \ writer;\n\n FastIO() = default;\n\n FastIO(const FastIO &) = delete;\n FastIO\
39- \ &operator=(const FastIO &) = delete;\n\n char getchar() { return reader.getchar();\
40- \ }\n void putchar(char c) { writer.putchar(c); }\n\n void flush() { writer.flush();\
41- \ }\n\n uint64_t read_u64() {\n char c;\n do\n c = getchar();\n \
42- \ while (c < '0' || c > '9');\n uint64_t x = 0;\n do\n x = x * 10\
43- \ + (c - '0'), c = getchar();\n while (c >= '0' && c <= '9');\n return x;\n \
44- \ }\n\n void write_u64(uint64_t x) {\n static char buf[20];\n size_t len\
45- \ = 0;\n do\n buf[len++] = '0' + (x % 10), x /= 10;\n while (x);\n \
46- \ for (size_t i = len - 1; ~i; --i)\n putchar(buf[i]);\n }\n\n void\
47- \ write_u64_line(uint64_t x) { write_u64(x), putchar('\\ n'); }\n };\n\n using FastIODefault\
48- \ = FastIO<FastReadMMap, FastWriteFWrite<>>;\n } // namespace weilycoder\n\n\n \
49- #line 4 \" test/many_aplusb.test.cpp\"\n using namespace weilycoder;\n\n static FastIODefault\
50- \ io;\n\n int main() {\n size_t t = io.read_u64();\n while (t--) {\n uint64_t\
51- \ a = io.read_u64();\n uint64_t b = io.read_u64();\n uint64_t c = a + b;\n \
52- \ io.write_u64_line(c);\n }\n return 0;\n }\n "
27+ \ munmap(data, file_size);\n }\n\n inline char getchar() {\n return\
28+ \ static_cast<size_t>(pos - data) < file_size ? *pos++ : EOF;\n }\n\n inline\
29+ \ char operator()() { return getchar(); }\n };\n\n template <size_t buffer_size\
30+ \ = 1 << 20> struct FastReadFRead {\n char buf[buffer_size], *pos = buf, *end\
31+ \ = buf;\n\n FastReadFRead() = default;\n\n FastReadFRead(const FastReadFRead\
32+ \ &) = delete;\n FastReadFRead &operator=(const FastReadFRead &) = delete;\n\n \
33+ \ inline char getchar() {\n return pos == end && (end = (pos = buf) + fread(buf,\
34+ \ 1, buffer_size, stdin),\n pos == end)\n \
35+ \ ? EOF\n : *pos++;\n }\n\n inline void clear() { pos = end\
36+ \ = buf; }\n\n inline void reopen() { clear(), fseek(stdin, 0, SEEK_SET); }\n \
37+ \n inline char operator()() { return getchar(); }\n };\n\n template <size_t buffer_size\
38+ \ = 1 << 20> struct FastWriteFWrite {\n char buf[buffer_size], *pos = buf;\n\n \
39+ \ FastWriteFWrite() = default;\n ~FastWriteFWrite() { flush(); }\n\n FastWriteFWrite(const\
40+ \ FastWriteFWrite &) = delete;\n FastWriteFWrite &operator=(const FastWriteFWrite\
41+ \ &) = delete;\n\n inline void putchar(char c) {\n if (pos - buf == buffer_size)\n \
42+ \ flush();\n *pos++ = c;\n }\n\n inline void flush() {\n size_t write_size\
43+ \ = pos - buf;\n if (write_size) {\n fwrite(buf, 1, write_size, stdout);\n \
44+ \ pos = buf;\n }\n }\n\n inline void operator()(char c) { putchar(c);\
45+ \ }\n };\n\n template <typename Reader, typename Writer, bool debug = false> struct\
46+ \ FastIO {\n Reader reader;\n Writer writer;\n\n FastIO() = default;\n\n FastIO(const\
47+ \ FastIO &) = delete;\n FastIO &operator=(const FastIO &) = delete;\n\n inline\
48+ \ char getchar() {\n if constexpr (debug)\n return std::getchar();\n \
49+ \ else\n return reader.getchar();\n }\n\n inline void putchar(char c)\
50+ \ {\n if constexpr (debug)\n std::putchar(c), std::fflush(stdout);\n \
51+ \ else\n writer.putchar(c);\n }\n\n inline void flush() { writer.flush();\
52+ \ }\n\n int32_t abs(int32_t x) { return x >= 0 ? x : -x; }\n\n template <typename\
53+ \ utype> inline utype _read_u() {\n char c;\n do\n c = getchar();\n \
54+ \ while (c < '0' || c > '9');\n utype x = 0;\n do\n x = x * 10 +\
55+ \ (c - '0'), c = getchar();\n while (c >= '0' && c <= '9');\n return x;\n \
56+ \ }\n\n template <typename itype, typename utype> inline itype _read_i() {\n \
57+ \ char c;\n bool neg = false;\n do\n if ((c = getchar()) == '-')\n \
58+ \ neg = true;\n while ((c < '0' || c > '9'));\n utype x = 0;\n \
59+ \ do\n x = x * 10 + (c - '0'), c = getchar();\n while (c >= '0' && c\
60+ \ <= '9');\n return static_cast<itype>(neg ? -x : x);\n }\n\n template <typename\
61+ \ utype, size_t bufsize> inline void _write_u(utype x) {\n static char buf[bufsize];\n \
62+ \ size_t len = 0;\n do\n buf[len++] = '0' + (x % 10), x /= 10;\n \
63+ \ while (x);\n for (size_t i = len - 1; ~i; --i)\n putchar(buf[i]);\n \
64+ \ }\n\n template <typename itype, size_t bufsize> inline void _write_i(itype\
65+ \ x) {\n bool neg = x < 0;\n static char buf[bufsize];\n size_t len =\
66+ \ 0;\n do\n buf[len++] = '0' + this->abs(x % 10), x /= 10;\n while\
67+ \ (x);\n if (neg)\n putchar('-');\n for (size_t i = len - 1; ~i; --i)\n \
68+ \ putchar(buf[i]);\n }\n\n inline int32_t read_i32() { return _read_i<int32_t,\
69+ \ uint32_t>(); }\n inline uint32_t read_u32() { return _read_u<uint32_t>(); }\n \
70+ \n inline void write_i32(int32_t x) { _write_i<int32_t, 10>(x); }\n inline void\
71+ \ write_u32(uint32_t x) { _write_u<uint32_t, 10>(x); }\n\n inline int64_t read_i64()\
72+ \ { return _read_i<int64_t, uint64_t>(); }\n inline uint64_t read_u64() { return\
73+ \ _read_u<uint64_t>(); }\n\n inline void write_i64(int64_t x) { _write_i<int64_t,\
74+ \ 20>(x); }\n inline void write_u64(uint64_t x) { _write_u<uint64_t, 20>(x);\
75+ \ }\n\n inline __int128 read_i128() { return _read_i<__int128, unsigned __int128>();\
76+ \ }\n inline unsigned __int128 read_u128() { return _read_u<unsigned __int128>();\
77+ \ }\n\n inline void write_i128(__int128 x) { _write_i<__int128, 40>(x); }\n \
78+ \ inline void write_u128(unsigned __int128 x) {\n _write_u<unsigned __int128,\
79+ \ 40>(x);\n }\n\n inline void write_i32_line(int32_t x) { write_i32(x), putchar('\\ \
80+ n'); }\n inline void write_u32_line(uint32_t x) { write_u32(x), putchar('\\ n');\
81+ \ }\n inline void write_i64_line(int64_t x) { write_i64(x), putchar('\\ n'); }\n \
82+ \ inline void write_u64_line(uint64_t x) { write_u64(x), putchar('\\ n'); }\n \
83+ \ inline void write_i128_line(__int128 x) { write_i128(x), putchar('\\ n'); }\n \
84+ \ inline void write_u128_line(unsigned __int128 x) {\n write_u128(x), putchar('\\ \
85+ n');\n }\n };\n\n template <bool debug = false>\n using FastIOStd = FastIO<FastReadMMap,\
86+ \ FastWriteFWrite<>, debug>;\n\n template <bool debug = false>\n using FastIOFile\
87+ \ = FastIO<FastReadFRead<>, FastWriteFWrite<>, debug>;\n } // namespace weilycoder\n \
88+ \n\n #line 4 \" test/many_aplusb.test.cpp\"\n using namespace weilycoder;\n\n static\
89+ \ FastIOStd<> io;\n\n int main() {\n size_t t = io.read_u64();\n while (t--)\
90+ \ {\n uint64_t a = io.read_u64();\n uint64_t b = io.read_u64();\n uint64_t\
91+ \ c = a + b;\n io.write_u64_line(c);\n }\n return 0;\n }\n "
5392 code : " #define PROBLEM \" https://judge.yosupo.jp/problem/many_aplusb\"\n\n #include\
54- \ \" ../weilycoder/fast-io.hpp\"\n using namespace weilycoder;\n\n static FastIODefault \
93+ \ \" ../weilycoder/fast-io.hpp\"\n using namespace weilycoder;\n\n static FastIOStd<> \
5594 \ io;\n\n int main() {\n size_t t = io.read_u64();\n while (t--) {\n uint64_t\
5695 \ a = io.read_u64();\n uint64_t b = io.read_u64();\n uint64_t c = a + b;\n \
5796 \ io.write_u64_line(c);\n }\n return 0;\n }"
6099 isVerificationFile : true
61100 path : test/many_aplusb.test.cpp
62101 requiredBy : []
63- timestamp : ' 2025-10-29 20:09:11 +08:00'
102+ timestamp : ' 2025-10-29 23:15:34 +08:00'
64103 verificationStatus : TEST_ACCEPTED
65104 verifiedWith : []
66105documentation_of : test/many_aplusb.test.cpp
0 commit comments