File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,16 @@ using namespace cp_algo;
1515constexpr int mod = 998244353 ;
1616constexpr int imod = -math::inv2(mod);
1717
18- template <int maxn = 100'000 >
18+ template <bool use_bump_alloc = false , int maxn = 100'000 >
1919vector<int > facts (vector<int > const & args) {
2020 constexpr int accum = 4 ;
2121 constexpr int simd_size = 8 ;
2222 constexpr int block = 1 << 18 ;
2323 constexpr int subblock = block / simd_size;
2424 using T = array<int , 2 >;
25- using alloc = bump_alloc<T, 30 * maxn>;
25+ using alloc = conditional_t <use_bump_alloc,
26+ bump_alloc<T, 30 * maxn>,
27+ allocator<T>>;
2628 basic_string<T, char_traits<T>, alloc> odd_args_per_block[mod / subblock];
2729 basic_string<T, char_traits<T>, alloc> reg_args_per_block[mod / subblock];
2830 constexpr int limit_reg = mod / 64 ;
You can’t perform that action at this time.
0 commit comments