Skip to content

Commit 8e1e012

Browse files
authored
[auto-verifier] docs commit a4cff83
1 parent e3eef9f commit 8e1e012

13 files changed

+486
-134
lines changed

index.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
data:
33
libraryCategories:
4-
- name: weilycoder/data-struct
4+
- name: weilycoder/ds
55
pages:
66
- icon: ':heavy_check_mark:'
7-
path: weilycoder/data-struct/static_range_sum.hpp
8-
title: weilycoder/data-struct/static_range_sum.hpp
7+
path: weilycoder/ds/static_range_sum.hpp
8+
title: weilycoder/ds/static_range_sum.hpp
99
- icon: ':heavy_check_mark:'
10-
path: weilycoder/data-struct/unionfind.hpp
11-
title: weilycoder/data-struct/unionfind.hpp
10+
path: weilycoder/ds/unionfind.hpp
11+
title: weilycoder/ds/unionfind.hpp
1212
- name: weilycoder
1313
pages:
1414
- icon: ':heavy_check_mark:'
@@ -22,12 +22,18 @@ data:
2222
verificationCategories:
2323
- name: test
2424
pages:
25+
- icon: ':heavy_check_mark:'
26+
path: test/aplusb.test.cpp
27+
title: test/aplusb.test.cpp
2528
- icon: ':heavy_check_mark:'
2629
path: test/biconnected_components.test.cpp
2730
title: test/biconnected_components.test.cpp
2831
- icon: ':heavy_check_mark:'
2932
path: test/many_aplusb.test.cpp
3033
title: test/many_aplusb.test.cpp
34+
- icon: ':heavy_check_mark:'
35+
path: test/many_aplusb_128bit.test.cpp
36+
title: test/many_aplusb_128bit.test.cpp
3137
- icon: ':heavy_check_mark:'
3238
path: test/static_range_sum.test.cpp
3339
title: test/static_range_sum.test.cpp

test/aplusb.test.cpp.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
data:
3+
_extendedDependsOn:
4+
- icon: ':heavy_check_mark:'
5+
path: weilycoder/fast-io.hpp
6+
title: weilycoder/fast-io.hpp
7+
_extendedRequiredBy: []
8+
_extendedVerifiedWith: []
9+
_isVerificationFailed: false
10+
_pathExtension: cpp
11+
_verificationStatusIcon: ':heavy_check_mark:'
12+
attributes:
13+
'*NOT_SPECIAL_COMMENTS*': ''
14+
PROBLEM: https://judge.yosupo.jp/problem/aplusb
15+
links:
16+
- https://judge.yosupo.jp/problem/aplusb
17+
bundledCode: "#line 1 \"test/aplusb.test.cpp\"\n#define PROBLEM \"https://judge.yosupo.jp/problem/aplusb\"\
18+
\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\nnamespace weilycoder {\nstruct 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\
24+
\ return;\n }\n\n file_size = st.st_size;\n data = reinterpret_cast<char\
25+
\ *>(\n mmap(nullptr, file_size, PROT_READ, MAP_PRIVATE, 0, 0));\n pos\
26+
\ = data;\n }\n\n ~FastReadMMap() {\n if (file_size != std::numeric_limits<size_t>::max())\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\ntemplate <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\ntemplate <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\ntemplate <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\ntemplate <bool debug = false>\nusing FastIOStd = FastIO<FastReadMMap,\
86+
\ FastWriteFWrite<>, debug>;\n\ntemplate <bool debug = false>\nusing FastIOFile\
87+
\ = FastIO<FastReadFRead<>, FastWriteFWrite<>, debug>;\n} // namespace weilycoder\n\
88+
\n\n#line 4 \"test/aplusb.test.cpp\"\nusing namespace weilycoder;\n\nstatic FastIOStd<true>\
89+
\ io;\n\nint main() {\n uint64_t a = io.read_u64();\n uint64_t b = io.read_u64();\n\
90+
\ io.write_u64_line(a + b);\n return 0;\n}\n"
91+
code: "#define PROBLEM \"https://judge.yosupo.jp/problem/aplusb\"\n\n#include \"\
92+
../weilycoder/fast-io.hpp\"\nusing namespace weilycoder;\n\nstatic FastIOStd<true>\
93+
\ io;\n\nint main() {\n uint64_t a = io.read_u64();\n uint64_t b = io.read_u64();\n\
94+
\ io.write_u64_line(a + b);\n return 0;\n}"
95+
dependsOn:
96+
- weilycoder/fast-io.hpp
97+
isVerificationFile: true
98+
path: test/aplusb.test.cpp
99+
requiredBy: []
100+
timestamp: '2025-10-29 23:15:34+08:00'
101+
verificationStatus: TEST_ACCEPTED
102+
verifiedWith: []
103+
documentation_of: test/aplusb.test.cpp
104+
layout: document
105+
redirect_from:
106+
- /verify/test/aplusb.test.cpp
107+
- /verify/test/aplusb.test.cpp.html
108+
title: test/aplusb.test.cpp
109+
---

test/biconnected_components.test.cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ data:
8888
isVerificationFile: true
8989
path: test/biconnected_components.test.cpp
9090
requiredBy: []
91-
timestamp: '2025-10-29 20:09:11+08:00'
91+
timestamp: '2025-10-29 23:15:34+08:00'
9292
verificationStatus: TEST_ACCEPTED
9393
verifiedWith: []
9494
documentation_of: test/biconnected_components.test.cpp

test/many_aplusb.test.cpp.md

Lines changed: 67 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -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\ntemplate <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\ntemplate\
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\nusing FastIODefault\
48-
\ = FastIO<FastReadMMap, FastWriteFWrite<>>;\n} // namespace weilycoder\n\n\n\
49-
#line 4 \"test/many_aplusb.test.cpp\"\nusing namespace weilycoder;\n\nstatic FastIODefault\
50-
\ io;\n\nint 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\ntemplate <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\ntemplate <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\ntemplate <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\ntemplate <bool debug = false>\nusing FastIOStd = FastIO<FastReadMMap,\
86+
\ FastWriteFWrite<>, debug>;\n\ntemplate <bool debug = false>\nusing FastIOFile\
87+
\ = FastIO<FastReadFRead<>, FastWriteFWrite<>, debug>;\n} // namespace weilycoder\n\
88+
\n\n#line 4 \"test/many_aplusb.test.cpp\"\nusing namespace weilycoder;\n\nstatic\
89+
\ FastIOStd<> io;\n\nint 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\"\nusing namespace weilycoder;\n\nstatic FastIODefault\
93+
\ \"../weilycoder/fast-io.hpp\"\nusing namespace weilycoder;\n\nstatic FastIOStd<>\
5594
\ io;\n\nint 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}"
@@ -60,7 +99,7 @@ data:
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: []
66105
documentation_of: test/many_aplusb.test.cpp

0 commit comments

Comments
 (0)