File tree Expand file tree Collapse file tree 9 files changed +21
-17
lines changed
Expand file tree Collapse file tree 9 files changed +21
-17
lines changed Original file line number Diff line number Diff line change 2727 cache : ' pip'
2828
2929 - name : Install cibuildwheel
30- run : python -m pip install cibuildwheel==2.21.3
30+ run : python -m pip install ".[test]"
3131
3232 - name : Build wheels
3333 run : python -m cibuildwheel
Original file line number Diff line number Diff line change 22
33[ ![ GitHub: acl-cpp-python] ( https://img.shields.io/badge/GitHub-acl--cpp--python-darkmagenta?logo=GitHub&logoColor=white )] ( https://github.com/tatyam-prime/acl-cpp-python )
44[ ![ PyPI: acl-cpp-python] ( https://img.shields.io/badge/PyPI-acl--cpp--python-006dad?logo=PyPI&logoColor=white )] ( https://pypi.org/project/acl-cpp-python/ )
5- [ ![ AC Library: v1.5.1 ] ( https://img.shields.io/badge/AC%20Library-v1.5.1 -seagreen )] ( https://github.com/atcoder/ac-library ) [ ![ License: CC0 1.0] ( https://img.shields.io/badge/License-CC0%201.0-darkgoldenrod )] ( https://creativecommons.org/publicdomain/zero/1.0/ )
5+ [ ![ AC Library: v1.6 ] ( https://img.shields.io/badge/AC%20Library-v1.6 -seagreen )] ( https://github.com/atcoder/ac-library ) [ ![ License: CC0 1.0] ( https://img.shields.io/badge/License-CC0%201.0-darkgoldenrod )] ( https://creativecommons.org/publicdomain/zero/1.0/ )
66
77Documentation: [ 日本語] ( https://tatyam-prime.github.io/acl-cpp-python/ja/ ) | [ English] ( https://tatyam-prime.github.io/acl-cpp-python/en/ )
88
Original file line number Diff line number Diff line change 22
33[ ![ GitHub: acl-cpp-python] ( https://img.shields.io/badge/GitHub-acl--cpp--python-darkmagenta?logo=GitHub&logoColor=white )] ( https://github.com/tatyam-prime/acl-cpp-python )
44[ ![ PyPI: acl-cpp-python] ( https://img.shields.io/badge/PyPI-acl--cpp--python-006dad?logo=PyPI&logoColor=white )] ( https://pypi.org/project/acl-cpp-python/ )
5- [ ![ AC Library: v1.5.1 ] ( https://img.shields.io/badge/AC%20Library-v1.5.1 -seagreen )] ( https://github.com/atcoder/ac-library ) [ ![ License: CC0 1.0] ( https://img.shields.io/badge/License-CC0%201.0-darkgoldenrod )] ( https://creativecommons.org/publicdomain/zero/1.0/ )
5+ [ ![ AC Library: v1.6 ] ( https://img.shields.io/badge/AC%20Library-v1.6 -seagreen )] ( https://github.com/atcoder/ac-library ) [ ![ License: CC0 1.0] ( https://img.shields.io/badge/License-CC0%201.0-darkgoldenrod )] ( https://creativecommons.org/publicdomain/zero/1.0/ )
66
77日本語 | <a href =" ../en/ " >English</a >
88
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ msgid ""
2828"python](https://img.shields.io/badge/PyPI-acl--cpp--python-"
2929"006dad?logo=PyPI&logoColor=white)](https://pypi.org/project/acl-cpp-"
3030"python/) [](https://github.com/atcoder"
31+ "v1.6 ](https://img.shields.io/badge/AC%20Library-v1.6 -seagreen)](https://github.com/atcoder"
3232"/ac-library) [](https://creativecommons.org/publicdomain/zero/1.0/)"
3434msgstr ""
@@ -42,7 +42,7 @@ msgid "PyPI: acl-cpp-python"
4242msgstr ""
4343
4444#: ../../index.md:3
45- msgid "AC Library: v1.5.1 "
45+ msgid "AC Library: v1.6 "
4646msgstr ""
4747
4848#: ../../index.md:3
Original file line number Diff line number Diff line change @@ -116,6 +116,6 @@ n = len(s)
116116sa = suffix_array(s)
117117lcp = lcp_array(s, sa)
118118
119- print (n * (n + 1 ) // 2 - sum (lcp))
119+ print (n * (n - 1 ) // 2 - sum (lcp))
120120```
121121
Original file line number Diff line number Diff line change 11[build-system ]
22requires = [
3- " scikit-build-core ~= 0.10.7 " ,
4- " nanobind ~= 2.2 .0"
3+ " scikit-build-core ~= 0.11.2 " ,
4+ " nanobind ~= 2.7 .0"
55]
66build-backend = " scikit_build_core.build"
77
88[project ]
99name = " acl-cpp-python"
10- version = " 0.6.1 "
10+ version = " 0.6.2 "
1111readme = " README.md"
1212description = " Python bindings for the AtCoder Library"
1313requires-python = " >=3.9"
@@ -41,7 +41,7 @@ docs = [
4141 " myst-parser ~= 4.0.0" ,
4242]
4343test = [
44- " cibuildwheel ~= 2.22.0 " ,
44+ " cibuildwheel ~= 2.23.3 " ,
4545 " pytest ~= 8.3.4" ,
4646]
4747build = [
@@ -50,7 +50,7 @@ build = [
5050]
5151
5252[tool .cibuildwheel ]
53- build = [" cp3{9,13}-*" , " pp3{9,10 }-*" ]
53+ build = [" cp3{9,13}-*" , " pp3{9,11 }-*" ]
5454archs = [" auto64" ]
5555test-requires = " pytest"
5656test-command = " pytest {project}/tests"
Original file line number Diff line number Diff line change @@ -192,8 +192,8 @@ void butterfly_inv(std::vector<mint>& a) {
192192 auto r = a[i + offset + p];
193193 a[i + offset] = l + r;
194194 a[i + offset + p] =
195- (unsigned long long )(mint::mod () + l.val () - r.val ()) * irot. val ();
196- ;
195+ (unsigned long long )(( unsigned int )( l.val () - r.val ()) + mint::mod ()) *
196+ irot. val () ;
197197 }
198198 if (s + 1 != (1 << (len - 1 )))
199199 irot *= info.irate2 [countr_zero (~(unsigned int )(s))];
Original file line number Diff line number Diff line change @@ -37,8 +37,7 @@ struct dsu {
3737
3838 int leader (int a) {
3939 assert (0 <= a && a < _n);
40- if (parent_or_size[a] < 0 ) return a;
41- return parent_or_size[a] = leader (parent_or_size[a]);
40+ return _leader (a);
4241 }
4342
4443 int size (int a) {
@@ -71,6 +70,11 @@ struct dsu {
7170 // root node: -1 * component size
7271 // otherwise: parent
7372 std::vector<int > parent_or_size;
73+
74+ int _leader (int a) {
75+ if (parent_or_size[a] < 0 ) return a;
76+ return parent_or_size[a] = _leader (parent_or_size[a]);
77+ }
7478};
7579
7680} // namespace atcoder
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ struct static_modint : internal::static_modint_base {
4848 _v = (unsigned int )(v % umod ());
4949 }
5050
51- unsigned int val () const { return _v; }
51+ int val () const { return _v; }
5252
5353 mint& operator ++() {
5454 _v++;
@@ -183,7 +183,7 @@ template <int id> struct dynamic_modint : internal::modint_base {
183183 _v = (unsigned int )(v % mod ());
184184 }
185185
186- unsigned int val () const { return _v; }
186+ int val () const { return _v; }
187187
188188 mint& operator ++() {
189189 _v++;
You can’t perform that action at this time.
0 commit comments