test/cpv/library-checker-other/sum_of_exponential_times_polynomial.mintd-md64.mints-bs.poly_anymod-p3ntt.factorial-factl_helper.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #define AUTO_GENERATED | ||
| 2 | // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/sum_of_exponential_times_polynomial | ||
| 3 | #include "../../../src/comb/seq/pows/lib.hpp" | ||
| 4 | #include "../../../src/math/ipaf/sum/lib.hpp" | ||
| 5 | |||
| 6 | using namespace tifa_libs; | ||
| 7 | CEXP u32 MOD = 998244353; | ||
| 8 | |||
| 9 | #include "../../../src/fps/ds/ntt3/lib.hpp" | ||
| 10 | #include "../../../src/math/ds/mint/bs/lib.hpp" | ||
| 11 | #include "../../../src/math/ds/mint/md64/lib.hpp" | ||
| 12 | #include "../../../src/math/fact/helper_l/lib.hpp" | ||
| 13 | |||
| 14 | using namespace tifa_libs; | ||
| 15 | using mint = mint_md64<__LINE__>; | ||
| 16 | using namespace tifa_libs; | ||
| 17 | using mint_p3ntt1 = mint_bs<167772161>; | ||
| 18 | using mint_p3ntt2 = mint_bs<469762049>; | ||
| 19 | using mint_p3ntt3 = mint_bs<754974721>; | ||
| 20 | using poly = poly3ntt<mint, mint_p3ntt1, mint_p3ntt2, mint_p3ntt3>; | ||
| 21 | using namespace tifa_libs; | ||
| 22 | using fact_t = factl_helper<poly>; | ||
| 23 | |||
| 24 | 20 | int main() { | |
| 25 | 20 | mint::set_mod(MOD); | |
| 26 |
1/2✓ Branch 2 taken 20 times.
✗ Branch 3 not taken.
|
20 | std::cin.tie(nullptr)->std::ios::sync_with_stdio(false); |
| 27 | u32 r, d; | ||
| 28 | u64 n; | ||
| 29 |
3/6✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 20 times.
✗ Branch 8 not taken.
|
20 | std::cin >> r >> d >> n; |
| 30 | 20 | auto p = tifa_libs::gen_pows<mint>(d + 1, d); | |
| 31 | 20 | std::cout << tifa_libs::sum_ipaf<mint, fact_t>(p, mint(r), n); | |
| 32 | 20 | return 0; | |
| 33 | 20 | } | |
| 34 |