test/cpv/yukicoder/0963.cossin.mints-ms64.poly_nttmod-pntt.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #define AUTO_GENERATED | ||
| 2 | #define AUTO_GENERATED | ||
| 3 | // competitive-verifier: PROBLEM https://yukicoder.me/problems/no/963 | ||
| 4 | #include "../../../src/fps/cossin/lib.hpp" | ||
| 5 | |||
| 6 | using namespace tifa_libs; | ||
| 7 | CEXP u32 MOD = 1012924417; | ||
| 8 | |||
| 9 | #include "../../../src/fps/ds/ntt/lib.hpp" | ||
| 10 | #include "../../../src/math/ds/mint/ms64/lib.hpp" | ||
| 11 | |||
| 12 | using namespace tifa_libs; | ||
| 13 | using mint = mint_ms64<MOD>; | ||
| 14 | using namespace tifa_libs; | ||
| 15 | using poly = polyntt<mint>; | ||
| 16 | |||
| 17 | 11 | int main() { | |
| 18 |
1/2✓ Branch 2 taken 11 times.
✗ Branch 3 not taken.
|
11 | std::cin.tie(nullptr)->std::ios::sync_with_stdio(false); |
| 19 | u32 n; | ||
| 20 |
1/2✓ Branch 1 taken 11 times.
✗ Branch 2 not taken.
|
11 | std::cin >> n; |
| 21 | 11 | mint fact_n = 1; | |
| 22 |
2/2✓ Branch 2 taken 742220 times.
✓ Branch 3 taken 11 times.
|
742231 | flt_ (u32, i, 1, n + 1) fact_n *= i; |
| 23 | 11 | auto [fc, fs] = tifa_libs::cossin_fps(poly{0, 1}, n + 1); | |
| 24 |
2/4✓ Branch 4 taken 11 times.
✗ Branch 5 not taken.
✓ Branch 13 taken 11 times.
✗ Branch 14 not taken.
|
11 | std::cout << ((fs + 1) * inv_fps(fc, n + 1))[n] * 2 * fact_n << '\n'; |
| 25 | 11 | return 0; | |
| 26 | 11 | } | |
| 27 |