Skip to content

Commit 15b85d3

Browse files
committed
fixes
1 parent 1fedae7 commit 15b85d3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cp-algo/math/poly/impl/div.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace cp_algo::math::poly::impl {
4747

4848
template<typename poly>
4949
poly powmod_hint(poly const& p, int64_t k, poly const& md, poly const& mdri) {
50-
return bpow(p, k, poly(1), [&](auto const& p, auto const& q){
50+
return bpow(p % md, k, poly(1), [&](auto const& p, auto const& q){
5151
return divmod_hint(p * q, md, mdri)[1];
5252
});
5353
}

verify/number_theory/primality.test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define PROBLEM "https://judge.yosupo.jp/problem/primality_test"
33
#pragma GCC optimize("O3,unroll-loops")
44
#pragma GCC target("avx2")
5+
#define CP_ALGO_NUMBER_THEORY_PRIMALITY_BASES_HPP
56
#include <iostream>
67
//#include "blazingio/blazingio.min.hpp"
78
#include "cp-algo/number_theory/primality_bases.hpp"

0 commit comments

Comments
 (0)