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