Skip to content

Commit adb894d

Browse files
committed
fix code for avoid out of range
1 parent fdf4780 commit adb894d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

atcoder/convolution.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ struct fft_info {
2222
std::array<mint, rank2 + 1> root; // root[i]^(2^i) == 1
2323
std::array<mint, rank2 + 1> iroot; // root[i] * iroot[i] == 1
2424

25-
std::array<mint, std::max(0, rank2 - 2 + 1)> rate2;
26-
std::array<mint, std::max(0, rank2 - 2 + 1)> irate2;
25+
std::array<mint, std::max(0, rank2 - 1 + 1)> rate2;
26+
std::array<mint, std::max(0, rank2 - 1 + 1)> irate2;
2727

28-
std::array<mint, std::max(0, rank2 - 3 + 1)> rate3;
29-
std::array<mint, std::max(0, rank2 - 3 + 1)> irate3;
28+
std::array<mint, std::max(0, rank2 - 2 + 1)> rate3;
29+
std::array<mint, std::max(0, rank2 - 2 + 1)> irate3;
3030

3131
fft_info() {
3232
root[rank2] = mint(g).pow((mint::mod() - 1) >> rank2);

0 commit comments

Comments
 (0)