test/cpv/library-checker-linear_algebra/pow_of_matrix.mintd-md64.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #define AUTO_GENERATED | ||
| 2 | // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/pow_of_matrix | ||
| 3 | #include "../../../src/lalg/ds/mat/lib.hpp" | ||
| 4 | #include "../../../src/lalg/mat/pow/lib.hpp" | ||
| 5 | |||
| 6 | using namespace tifa_libs; | ||
| 7 | CEXP u32 MOD = 998244353; | ||
| 8 | |||
| 9 | #include "../../../src/math/ds/mint/md64/lib.hpp" | ||
| 10 | |||
| 11 | using namespace tifa_libs; | ||
| 12 | using mint = mint_md64<__LINE__>; | ||
| 13 | using mat = tifa_libs::matrix<mint>; | ||
| 14 | |||
| 15 | 43 | int main() { | |
| 16 | 43 | mint::set_mod(MOD); | |
| 17 |
1/2✓ Branch 2 taken 43 times.
✗ Branch 3 not taken.
|
43 | std::cin.tie(nullptr)->std::ios::sync_with_stdio(false); |
| 18 | u32 n; | ||
| 19 | u64 k; | ||
| 20 |
2/4✓ Branch 1 taken 43 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 43 times.
✗ Branch 5 not taken.
|
43 | std::cin >> n >> k; |
| 21 | 43 | mat a(n, n); | |
| 22 | 43 | std::cin >> a; | |
| 23 | 43 | std::cout << tifa_libs::pow(a, k); | |
| 24 | 43 | return 0; | |
| 25 | 43 | } | |
| 26 |