Skip to content

Commit 094744a

Browse files
authored
Merge pull request #178 from atcoder/issue/177
remove unsigned from the changed value of modint.val()
2 parents 91102f7 + 748a564 commit 094744a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/document.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ jobs:
3131
VERSION: ${{ steps.version.outputs.VERSION_NAME }}
3232
- name: Publish to github pages
3333
if: ${{ github.event_name == 'push' }}
34-
uses: peaceiris/actions-gh-pages@v3
34+
uses: peaceiris/actions-gh-pages@v4
3535
with:
36-
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
3737
publish_dir: ./tools/generated
3838
destination_dir: ${{ steps.version.outputs.VERSION_NAME }}
3939
- name: Upload zip

atcoder/convolution.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void butterfly_inv(std::vector<mint>& a) {
130130
auto r = a[i + offset + p];
131131
a[i + offset] = l + r;
132132
a[i + offset + p] =
133-
(unsigned long long)(mint::mod() + l.val() - r.val()) *
133+
(unsigned long long)((unsigned int)(l.val() - r.val()) + mint::mod()) *
134134
irot.val();
135135
;
136136
}

atcoder/modint.hpp

+2-2
Original file line numberDiff line numberDiff 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++;
@@ -165,7 +165,7 @@ template <int id> struct dynamic_modint : internal::modint_base {
165165
_v = (unsigned int)(v % mod());
166166
}
167167

168-
unsigned int val() const { return _v; }
168+
int val() const { return _v; }
169169

170170
mint& operator++() {
171171
_v++;

0 commit comments

Comments
 (0)