Skip to content

Commit

Permalink
[auto-verifier] docs commit 50bb2c5
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow authored Dec 3, 2023
1 parent 5dff363 commit 88b0f32
Show file tree
Hide file tree
Showing 43 changed files with 791 additions and 334 deletions.
31 changes: 24 additions & 7 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ data:
title: library/bst/rbst-base.hpp
- name: library/convolution
pages:
- icon: ':warning:'
path: library/convolution/gcd-convolution.hpp
title: library/convolution/gcd-convolution.hpp
- icon: ':warning:'
path: library/convolution/lcm-convolution.hpp
title: library/convolution/lcm-convolution.hpp
- icon: ':heavy_check_mark:'
path: library/convolution/ntt.hpp
title: library/convolution/ntt.hpp
Expand Down Expand Up @@ -143,7 +149,7 @@ data:
- icon: ':heavy_check_mark:'
path: library/graph/max-clique.hpp
title: library/graph/max-clique.hpp
- icon: ':x:'
- icon: ':heavy_check_mark:'
path: library/graph/scc.hpp
title: library/graph/scc.hpp
- name: library/math
Expand All @@ -157,10 +163,13 @@ data:
- icon: ':heavy_check_mark:'
path: library/math/discrete-log.hpp
title: "Discrete Log (\u96E2\u6563\u5C0D\u6578 $a^x \\equiv b \\pmod m$)"
- icon: ':warning:'
path: library/math/divisor-multiple-transform.hpp
title: library/math/divisor-multiple-transform.hpp
- icon: ':heavy_check_mark:'
path: library/math/factorize.hpp
title: "Integer Factorization (Pollard Rho \u8CEA\u56E0\u6578\u5206\u89E3)"
- icon: ':heavy_check_mark:'
- icon: ':x:'
path: library/math/floor-sum.hpp
title: Sum of floor linear ($\sum_{i = 0}^{n - 1} \lfloor \frac{ai + b}{m} \rfloor$)
- icon: ':heavy_check_mark:'
Expand All @@ -175,13 +184,16 @@ data:
- icon: ':heavy_check_mark:'
path: library/math/pow-mod.hpp
title: library/math/pow-mod.hpp
- icon: ':heavy_check_mark:'
path: library/math/prime-enumerate.hpp
title: library/math/prime-enumerate.hpp
- icon: ':heavy_check_mark:'
path: library/math/primitive-root.hpp
title: library/math/primitive-root.hpp
- icon: ':question:'
path: library/math/safe-mod.hpp
title: library/math/safe-mod.hpp
- icon: ':x:'
- icon: ':heavy_check_mark:'
path: library/math/two-sat.hpp
title: library/math/two-sat.hpp
- icon: ':heavy_check_mark:'
Expand Down Expand Up @@ -520,10 +532,10 @@ data:
title: test/graph/max-clique/yosupo-Maximum-Independent-Set.test.cpp
- name: test/graph/scc
pages:
- icon: ':x:'
- icon: ':heavy_check_mark:'
path: test/graph/scc/aoj-grl-Strongly-Connected-Components.test.cpp
title: test/graph/scc/aoj-grl-Strongly-Connected-Components.test.cpp
- icon: ':x:'
- icon: ':heavy_check_mark:'
path: test/graph/scc/yosupo-Strongly-Connected-Components.test.cpp
title: test/graph/scc/yosupo-Strongly-Connected-Components.test.cpp
- name: test/math/binary-gcd
Expand All @@ -546,7 +558,7 @@ data:
title: test/math/factorize/yosupo-Factorize.test.cpp
- name: test/math/floor-sum
pages:
- icon: ':heavy_check_mark:'
- icon: ':x:'
path: test/math/floor-sum/yosupo-Sum-of-Floor-of-Linear.test.cpp
title: test/math/floor-sum/yosupo-Sum-of-Floor-of-Linear.test.cpp
- name: test/math/integer-div
Expand All @@ -559,9 +571,14 @@ data:
- icon: ':heavy_check_mark:'
path: test/math/is-prime/yosupo-Primality-Test.test.cpp
title: test/math/is-prime/yosupo-Primality-Test.test.cpp
- name: test/math/prime-enumerate
pages:
- icon: ':heavy_check_mark:'
path: test/math/prime-enumerate/yosupo-Enumerate-Primes.test.cpp
title: test/math/prime-enumerate/yosupo-Enumerate-Primes.test.cpp
- name: test/math/two-sat
pages:
- icon: ':x:'
- icon: ':heavy_check_mark:'
path: test/math/two-sat/yosupo-2-Sat.test.cpp
title: test/math/two-sat/yosupo-2-Sat.test.cpp
- name: test/math/xor-basis
Expand Down
4 changes: 2 additions & 2 deletions library/bst/rbst-base.hpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,16 @@ data:
isVerificationFile: false
path: library/bst/rbst-base.hpp
requiredBy:
- library/data-structure/ordered-set.hpp
- library/data-structure/lazy-treap.hpp
- library/data-structure/treap.hpp
- library/data-structure/ordered-set.hpp
timestamp: '2023-07-11 10:41:16+08:00'
verificationStatus: LIBRARY_SOME_WA
verifiedWith:
- test/data-structure/ordered-set/yosupo-Predecessor-Problem.test.cpp
- test/data-structure/treap/yosupo-Dynamic-Sequence-Range-Affine-Range-Sum.test.cpp
- test/data-structure/treap/yosupo-Range-Reverse-Range-Sum.test.cpp
- test/data-structure/treap/unit-test-treap.test.cpp
- test/data-structure/ordered-set/yosupo-Predecessor-Problem.test.cpp
documentation_of: library/bst/rbst-base.hpp
layout: document
redirect_from:
Expand Down
72 changes: 72 additions & 0 deletions library/convolution/gcd-convolution.hpp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
data:
_extendedDependsOn:
- icon: ':warning:'
path: library/math/divisor-multiple-transform.hpp
title: library/math/divisor-multiple-transform.hpp
- icon: ':heavy_check_mark:'
path: library/math/prime-enumerate.hpp
title: library/math/prime-enumerate.hpp
_extendedRequiredBy: []
_extendedVerifiedWith: []
_isVerificationFailed: false
_pathExtension: hpp
_verificationStatusIcon: ':warning:'
attributes:
links: []
bundledCode: "#line 2 \"library/convolution/gcd-convolution.hpp\"\n#include <vector>\r\
\n#include <cassert>\r\n#line 3 \"library/math/prime-enumerate.hpp\"\n#include\
\ <cmath>\r\n\r\nnamespace felix {\r\n\r\n// 2, 3, 5, 7, ...\r\nstd::vector<int>\
\ prime_enumerate(int N) {\r\n\tstd::vector<bool> sieve(N / 3 + 1, 1);\r\n\tfor(int\
\ p = 5, d = 4, i = 1, sqn = std::sqrt(N); p <= sqn; p += d = 6 - d, i++) {\r\n\
\t\tif(!sieve[i]) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tfor(int q = p * p / 3,\
\ r = d * p / 3 + (d * p % 3 == 2), s = 2 * p, qe = sieve.size(); q < qe; q +=\
\ r = s - r) {\r\n\t\t\tsieve[q] = 0;\r\n\t\t}\r\n\t}\r\n\tstd::vector<int> ret{2,\
\ 3};\r\n\tfor(int p = 5, d = 4, i = 1; p <= N; p += d = 6 - d, i++) {\r\n\t\t\
if(sieve[i]) {\r\n\t\t\tret.push_back(p);\r\n\t\t}\r\n\t}\r\n\twhile(!ret.empty()\
\ && ret.back() > N) {\r\n\t\tret.pop_back();\r\n\t}\r\n\treturn ret;\r\n}\r\n\
\r\n} // namespace felix\r\n#line 4 \"library/math/divisor-multiple-transform.hpp\"\
\n\r\nnamespace felix {\r\n\r\nstruct divisor_transform {\r\n\ttemplate<class\
\ T>\r\n\tstatic void zeta_transform(std::vector<T>& a) {\r\n\t\tint n = a.size()\
\ - 1;\r\n\t\tfor(auto p : prime_enumerate(n)) {\r\n\t\t\tfor(int i = 1; i * p\
\ <= n; i++) {\r\n\t\t\t\ta[i * p] += a[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\
\ttemplate<class T>\r\n\tstatic void mobius_transform(std::vector<T>& a) {\r\n\
\t\tint n = a.size() - 1;\r\n\t\tfor(auto p : prime_enumerate(n)) {\r\n\t\t\t\
for(int i = n / p; i > 0; i--) {\r\n\t\t\t\ta[i * p] -= a[i];\r\n\t\t\t}\r\n\t\
\t}\r\n\t}\r\n};\r\n\r\nstruct multiple_transform {\r\n\ttemplate<class T>\r\n\
\tstatic void zeta_transform(std::vector<T>& a) {\r\n\t\tint n = a.size() - 1;\r\
\n\t\tfor(auto p : prime_enumerate(n)) {\r\n\t\t\tfor(int i = n / p; i > 0; i--)\
\ {\r\n\t\t\t\ta[i] += a[i * p];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttemplate<class\
\ T>\r\n\tstatic void mobius_transform(std::vector<T>& a) {\r\n\t\tint n = a.size()\
\ - 1;\r\n\t\tfor(auto p : prime_enumerate(n)) {\r\n\t\t\tfor(int i = 1; i * p\
\ <= n; i++) {\r\n\t\t\t\ta[i] -= a[i * p];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\
\n\r\n} // namespace felix\r\n#line 5 \"library/convolution/gcd-convolution.hpp\"\
\n\r\nnamespace felix {\r\n\r\ntemplate<class T>\r\nstd::vector<T> gcd_convolution(const\
\ std::vector<T>& a, const std::vector<T>& b) {\r\n\tassert(a.size() == b.size());\r\
\n\tauto f = a, g = b;\r\n\tmultiple_transform::zeta_transform(f);\r\n\tmultiple_transform::zeta_transform(g);\r\
\n\tfor(int i = 0; i < (int) f.size(); i++) {\r\n\t\tf[i] *= g[i];\r\n\t}\r\n\t\
multiple_transform::mobius_transform(f);\r\n\treturn f;\r\n}\r\n\r\n} // namespace\
\ felix\n"
code: "#pragma once\r\n#include <vector>\r\n#include <cassert>\r\n#include \"../math/divisor-multiple-transform.hpp\"\
\r\n\r\nnamespace felix {\r\n\r\ntemplate<class T>\r\nstd::vector<T> gcd_convolution(const\
\ std::vector<T>& a, const std::vector<T>& b) {\r\n\tassert(a.size() == b.size());\r\
\n\tauto f = a, g = b;\r\n\tmultiple_transform::zeta_transform(f);\r\n\tmultiple_transform::zeta_transform(g);\r\
\n\tfor(int i = 0; i < (int) f.size(); i++) {\r\n\t\tf[i] *= g[i];\r\n\t}\r\n\t\
multiple_transform::mobius_transform(f);\r\n\treturn f;\r\n}\r\n\r\n} // namespace\
\ felix"
dependsOn:
- library/math/divisor-multiple-transform.hpp
- library/math/prime-enumerate.hpp
isVerificationFile: false
path: library/convolution/gcd-convolution.hpp
requiredBy: []
timestamp: '2023-12-03 13:41:56+08:00'
verificationStatus: LIBRARY_NO_TESTS
verifiedWith: []
documentation_of: library/convolution/gcd-convolution.hpp
layout: document
redirect_from:
- /library/library/convolution/gcd-convolution.hpp
- /library/library/convolution/gcd-convolution.hpp.html
title: library/convolution/gcd-convolution.hpp
---
72 changes: 72 additions & 0 deletions library/convolution/lcm-convolution.hpp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
data:
_extendedDependsOn:
- icon: ':warning:'
path: library/math/divisor-multiple-transform.hpp
title: library/math/divisor-multiple-transform.hpp
- icon: ':heavy_check_mark:'
path: library/math/prime-enumerate.hpp
title: library/math/prime-enumerate.hpp
_extendedRequiredBy: []
_extendedVerifiedWith: []
_isVerificationFailed: false
_pathExtension: hpp
_verificationStatusIcon: ':warning:'
attributes:
links: []
bundledCode: "#line 2 \"library/convolution/lcm-convolution.hpp\"\n#include <vector>\r\
\n#include <cassert>\r\n#line 3 \"library/math/prime-enumerate.hpp\"\n#include\
\ <cmath>\r\n\r\nnamespace felix {\r\n\r\n// 2, 3, 5, 7, ...\r\nstd::vector<int>\
\ prime_enumerate(int N) {\r\n\tstd::vector<bool> sieve(N / 3 + 1, 1);\r\n\tfor(int\
\ p = 5, d = 4, i = 1, sqn = std::sqrt(N); p <= sqn; p += d = 6 - d, i++) {\r\n\
\t\tif(!sieve[i]) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tfor(int q = p * p / 3,\
\ r = d * p / 3 + (d * p % 3 == 2), s = 2 * p, qe = sieve.size(); q < qe; q +=\
\ r = s - r) {\r\n\t\t\tsieve[q] = 0;\r\n\t\t}\r\n\t}\r\n\tstd::vector<int> ret{2,\
\ 3};\r\n\tfor(int p = 5, d = 4, i = 1; p <= N; p += d = 6 - d, i++) {\r\n\t\t\
if(sieve[i]) {\r\n\t\t\tret.push_back(p);\r\n\t\t}\r\n\t}\r\n\twhile(!ret.empty()\
\ && ret.back() > N) {\r\n\t\tret.pop_back();\r\n\t}\r\n\treturn ret;\r\n}\r\n\
\r\n} // namespace felix\r\n#line 4 \"library/math/divisor-multiple-transform.hpp\"\
\n\r\nnamespace felix {\r\n\r\nstruct divisor_transform {\r\n\ttemplate<class\
\ T>\r\n\tstatic void zeta_transform(std::vector<T>& a) {\r\n\t\tint n = a.size()\
\ - 1;\r\n\t\tfor(auto p : prime_enumerate(n)) {\r\n\t\t\tfor(int i = 1; i * p\
\ <= n; i++) {\r\n\t\t\t\ta[i * p] += a[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\
\ttemplate<class T>\r\n\tstatic void mobius_transform(std::vector<T>& a) {\r\n\
\t\tint n = a.size() - 1;\r\n\t\tfor(auto p : prime_enumerate(n)) {\r\n\t\t\t\
for(int i = n / p; i > 0; i--) {\r\n\t\t\t\ta[i * p] -= a[i];\r\n\t\t\t}\r\n\t\
\t}\r\n\t}\r\n};\r\n\r\nstruct multiple_transform {\r\n\ttemplate<class T>\r\n\
\tstatic void zeta_transform(std::vector<T>& a) {\r\n\t\tint n = a.size() - 1;\r\
\n\t\tfor(auto p : prime_enumerate(n)) {\r\n\t\t\tfor(int i = n / p; i > 0; i--)\
\ {\r\n\t\t\t\ta[i] += a[i * p];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttemplate<class\
\ T>\r\n\tstatic void mobius_transform(std::vector<T>& a) {\r\n\t\tint n = a.size()\
\ - 1;\r\n\t\tfor(auto p : prime_enumerate(n)) {\r\n\t\t\tfor(int i = 1; i * p\
\ <= n; i++) {\r\n\t\t\t\ta[i] -= a[i * p];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\
\n\r\n} // namespace felix\r\n#line 5 \"library/convolution/lcm-convolution.hpp\"\
\n\r\nnamespace felix {\r\n\r\ntemplate<class T>\r\nstd::vector<T> gcd_convolution(const\
\ std::vector<T>& a, const std::vector<T>& b) {\r\n\tassert(a.size() == b.size());\r\
\n\tauto f = a, g = b;\r\n\tdivisor_transform::zeta_transform(f);\r\n\tdivisor_transform::zeta_transform(g);\r\
\n\tfor(int i = 0; i < (int) f.size(); i++) {\r\n\t\tf[i] *= g[i];\r\n\t}\r\n\t\
divisor_transform::mobius_transform(f);\r\n\treturn f;\r\n}\r\n\r\n} // namespace\
\ felix\n"
code: "#pragma once\r\n#include <vector>\r\n#include <cassert>\r\n#include \"../math/divisor-multiple-transform.hpp\"\
\r\n\r\nnamespace felix {\r\n\r\ntemplate<class T>\r\nstd::vector<T> gcd_convolution(const\
\ std::vector<T>& a, const std::vector<T>& b) {\r\n\tassert(a.size() == b.size());\r\
\n\tauto f = a, g = b;\r\n\tdivisor_transform::zeta_transform(f);\r\n\tdivisor_transform::zeta_transform(g);\r\
\n\tfor(int i = 0; i < (int) f.size(); i++) {\r\n\t\tf[i] *= g[i];\r\n\t}\r\n\t\
divisor_transform::mobius_transform(f);\r\n\treturn f;\r\n}\r\n\r\n} // namespace\
\ felix"
dependsOn:
- library/math/divisor-multiple-transform.hpp
- library/math/prime-enumerate.hpp
isVerificationFile: false
path: library/convolution/lcm-convolution.hpp
requiredBy: []
timestamp: '2023-12-03 13:41:56+08:00'
verificationStatus: LIBRARY_NO_TESTS
verifiedWith: []
documentation_of: library/convolution/lcm-convolution.hpp
layout: document
redirect_from:
- /library/library/convolution/lcm-convolution.hpp
- /library/library/convolution/lcm-convolution.hpp.html
title: library/convolution/lcm-convolution.hpp
---
12 changes: 6 additions & 6 deletions library/convolution/ntt.hpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -520,18 +520,18 @@ data:
timestamp: '2023-07-31 16:36:45+08:00'
verificationStatus: LIBRARY_ALL_AC
verifiedWith:
- test/convolution/ntt/yosupo-Convolution.test.cpp
- test/convolution/ntt/yosupo-Convolution-Mod-1000000007.test.cpp
- test/convolution/ntt/yosupo-Convolution-Large.test.cpp
- test/formal-power-series/poly/yosupo-Inv-of-Formal-Power-Series.test.cpp
- test/formal-power-series/poly/yosupo-Pow-of-Formal-Power-Series.test.cpp
- test/formal-power-series/poly/yosupo-Exp-of-Formal-Power-Series.test.cpp
- test/formal-power-series/poly/yosupo-Product-of-Polynomial-Sequence.test.cpp
- test/formal-power-series/poly/yosupo-Sqrt-of-Formal-Power-Series.test.cpp
- test/formal-power-series/poly/yosupo-Log-of-Formal-Power-Series.test.cpp
- test/formal-power-series/poly/yosupo-Polynomial-Taylor-Shift.test.cpp
- test/formal-power-series/poly/yosupo-Inv-of-Formal-Power-Series.test.cpp
- test/formal-power-series/poly/yosupo-Multipoint-Evaluation.test.cpp
- test/formal-power-series/poly/yosupo-Log-of-Formal-Power-Series.test.cpp
- test/formal-power-series/poly/yosupo-Sqrt-of-Formal-Power-Series.test.cpp
- test/formal-power-series/series/yosupo-Partition-Function.test.cpp
- test/convolution/ntt/yosupo-Convolution-Large.test.cpp
- test/convolution/ntt/yosupo-Convolution.test.cpp
- test/convolution/ntt/yosupo-Convolution-Mod-1000000007.test.cpp
documentation_of: library/convolution/ntt.hpp
layout: document
redirect_from:
Expand Down
2 changes: 1 addition & 1 deletion library/convolution/subset-convolution.hpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ data:
timestamp: '2023-05-28 03:49:52+08:00'
verificationStatus: LIBRARY_ALL_AC
verifiedWith:
- test/convolution/subset-convolution/yosupo-Subset-Convolution.test.cpp
- test/convolution/subset-convolution/yosupo-Bitwise-Xor-Convolution.test.cpp
- test/convolution/subset-convolution/yosupo-Subset-Convolution.test.cpp
- test/convolution/subset-convolution/yosupo-Bitwise-And-Convolution.test.cpp
documentation_of: library/convolution/subset-convolution.hpp
layout: document
Expand Down
Loading

0 comments on commit 88b0f32

Please sign in to comment.