@@ -16,17 +16,19 @@ data:
1616 - https://judge.yosupo.jp/problem/many_aplusb
1717 bundledCode : " #line 1 \" test/many_aplusb.test.cpp\"\n #define PROBLEM \" https://judge.yosupo.jp/problem/many_aplusb\" \
1818 \n\n #line 1 \" weilycoder/fast-io.hpp\"\n\n\n\n #include <cstddef>\n #include <cstdint>\n \
19- #include <cstdio>\n #include <limits>\n #include <sys/mman.h>\n #include <sys/stat.h>\n \
20- #include <unistd.h>\n\n namespace weilycoder {\n struct FastReadMMap {\n size_t\
21- \ file_size;\n char *data, *pos;\n\n FastReadMMap(const FastReadMMap &) = delete;\n \
22- \ FastReadMMap &operator=(const FastReadMMap &) = delete;\n\n FastReadMMap()\
23- \ {\n struct stat st;\n\n if (fstat(0, &st) != 0) {\n file_size = std::numeric_limits<size_t>::max();\n \
19+ #include <cstdio>\n #include <limits>\n\n #if defined(__linux__) || defined(__unix__)\
20+ \ || defined(__APPLE__)\n #include <sys/mman.h>\n #include <sys/stat.h>\n #include\
21+ \ <unistd.h>\n #endif\n\n namespace weilycoder {\n #if defined(__linux__) || defined(__unix__)\
22+ \ || defined(__APPLE__)\n struct FastReadMMap {\n size_t file_size;\n char *data,\
23+ \ *pos;\n\n FastReadMMap(const FastReadMMap &) = delete;\n FastReadMMap &operator=(const\
24+ \ FastReadMMap &) = delete;\n\n FastReadMMap() {\n struct stat st;\n\n \
25+ \ if (fstat(0, &st) != 0) {\n file_size = std::numeric_limits<size_t>::max();\n \
2426 \ return;\n }\n\n file_size = st.st_size;\n data = reinterpret_cast<char\
2527 \ *>(\n mmap(nullptr, file_size, PROT_READ, MAP_PRIVATE, 0, 0));\n pos\
2628 \ = data;\n }\n\n ~FastReadMMap() {\n if (file_size != std::numeric_limits<size_t>::max())\n \
2729 \ munmap(data, file_size);\n }\n\n inline char getchar() {\n return\
2830 \ 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\
31+ \ char operator()() { return getchar(); }\n };\n #endif \n \n template <size_t buffer_size\
3032 \ = 1 << 20> struct FastReadFRead {\n char buf[buffer_size], *pos = buf, *end\
3133 \ = buf;\n\n FastReadFRead() = default;\n\n FastReadFRead(const FastReadFRead\
3234 \ &) = delete;\n FastReadFRead &operator=(const FastReadFRead &) = delete;\n\n \
@@ -82,15 +84,16 @@ data:
8284 \ inline void write_u64_line(uint64_t x) { write_u64(x), putchar('\\ n'); }\n \
8385 \ inline void write_i128_line(__int128 x) { write_i128(x), putchar('\\ n'); }\n \
8486 \ 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 "
87+ n');\n }\n };\n\n #if defined(__linux__) || defined(__unix__) || defined(__APPLE__)\n \
88+ template <bool debug = false>\n using FastIOMMap = FastIO<FastReadMMap, FastWriteFWrite<>,\
89+ \ debug>;\n #endif\n\n template <bool debug = false>\n using FastIOFile = FastIO<FastReadFRead<>,\
90+ \ FastWriteFWrite<>, debug>;\n } // namespace weilycoder\n\n\n #line 4 \" test/many_aplusb.test.cpp\" \
91+ \n using namespace weilycoder;\n\n static FastIOMMap<> io;\n\n int main() {\n size_t\
92+ \ t = io.read_u64();\n while (t--) {\n uint64_t a = io.read_u64();\n uint64_t\
93+ \ b = io.read_u64();\n uint64_t c = a + b;\n io.write_u64_line(c);\n }\n \
94+ \ return 0;\n }\n "
9295 code : " #define PROBLEM \" https://judge.yosupo.jp/problem/many_aplusb\"\n\n #include\
93- \ \" ../weilycoder/fast-io.hpp\"\n using namespace weilycoder;\n\n static FastIOStd <>\
96+ \ \" ../weilycoder/fast-io.hpp\"\n using namespace weilycoder;\n\n static FastIOMMap <>\
9497 \ io;\n\n int main() {\n size_t t = io.read_u64();\n while (t--) {\n uint64_t\
9598 \ a = io.read_u64();\n uint64_t b = io.read_u64();\n uint64_t c = a + b;\n \
9699 \ io.write_u64_line(c);\n }\n return 0;\n }"
99102 isVerificationFile : true
100103 path : test/many_aplusb.test.cpp
101104 requiredBy : []
102- timestamp : ' 2025-10-29 23:15:34 +08:00'
105+ timestamp : ' 2025-10-29 23:28:06 +08:00'
103106 verificationStatus : TEST_ACCEPTED
104107 verifiedWith : []
105108documentation_of : test/many_aplusb.test.cpp
0 commit comments