File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 8
8
#include < ranges>
9
9
10
10
namespace cp_algo ::math {
11
- template <bool use_bump_alloc = false , int maxn = 100'000 >
11
+ template <bool use_bump_alloc = false , int maxn = - 1 >
12
12
auto facts (auto const & args) {
13
+ static_assert (!use_bump_alloc || maxn > 0 , " maxn must be set if use_bump_alloc is true" );
13
14
constexpr int max_mod = 1'000'000'000 ;
14
15
constexpr int accum = 4 ;
15
16
constexpr int simd_size = 8 ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ void solve() {
15
15
vector<base> args (n);
16
16
for (auto &x : args) {cin >> x;}
17
17
cp_algo::checkpoint (" read" );
18
- auto res = facts (args);
18
+ auto res = facts< true , 100'000 > (args);
19
19
for (auto it: res) {cout << it << " \n " ;}
20
20
cp_algo::checkpoint (" write" );
21
21
cp_algo::checkpoint<1 >();
You can’t perform that action at this time.
0 commit comments