test/cpv/library-checker-other/kth_term_of_linearly_recurrent_sequence.mints-ms64.poly_nttmod-pntt.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #define AUTO_GENERATED | ||
| 2 | // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/kth_term_of_linearly_recurrent_sequence | ||
| 3 | #include "../../../src/io/container/lib.hpp" | ||
| 4 | #include "../../../src/math/lrec/nth_term/lib.hpp" | ||
| 5 | |||
| 6 | using namespace tifa_libs; | ||
| 7 | CEXP u32 MOD = 998244353; | ||
| 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 | 20 | int main() { | |
| 18 |
1/2✓ Branch 2 taken 20 times.
✗ Branch 3 not taken.
|
20 | std::cin.tie(nullptr)->std::ios::sync_with_stdio(false); |
| 19 | u32 d; | ||
| 20 | u64 k; | ||
| 21 |
2/4✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
|
20 | std::cin >> d >> k; |
| 22 |
2/4✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
|
60 | vec<mint> a(d), c(d + 1); |
| 23 | 20 | std::cin >> a; | |
| 24 | 20 | c[0] = 1; | |
| 25 |
2/2✓ Branch 0 taken 642367 times.
✓ Branch 1 taken 20 times.
|
642387 | flt_ (u32, i, 1, d + 1) { |
| 26 | 642367 | std::cin >> c[i]; | |
| 27 | 642367 | c[i] = -c[i]; | |
| 28 | } | ||
| 29 |
1/2✓ Branch 3 taken 20 times.
✗ Branch 4 not taken.
|
20 | std::cout << tifa_libs::nth_term_lrec<poly>(k, a, c) << '\n'; |
| 30 | 20 | return 0; | |
| 31 | 20 | } | |
| 32 |