test/cpv/library-checker-linear_algebra/sparse_matrix_det.mintd-md64.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #define AUTO_GENERATED | ||
| 2 | // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/sparse_matrix_det | ||
| 3 | #include "../../../src/lalg/ds/matsp/lib.hpp" | ||
| 4 | #include "../../../src/lalg/mat/det_rd/lib.hpp" | ||
| 5 | #include "../../../src/util/rand/lib.hpp" | ||
| 6 | |||
| 7 | using namespace tifa_libs; | ||
| 8 | CEXP u32 MOD = 998244353; | ||
| 9 | |||
| 10 | #include "../../../src/math/ds/mint/md64/lib.hpp" | ||
| 11 | |||
| 12 | using namespace tifa_libs; | ||
| 13 | using mint = mint_md64<__LINE__>; | ||
| 14 | using mat = tifa_libs::matsp<mint>; | ||
| 15 | |||
| 16 | 24 | int main() { | |
| 17 | 24 | mint::set_mod(MOD); | |
| 18 |
1/2✓ Branch 2 taken 24 times.
✗ Branch 3 not taken.
|
24 | std::cin.tie(nullptr)->std::ios::sync_with_stdio(false); |
| 19 | u32 n, k; | ||
| 20 |
2/4✓ Branch 1 taken 24 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 24 times.
✗ Branch 5 not taken.
|
24 | std::cin >> n >> k; |
| 21 | 24 | mat a(n, n); | |
| 22 |
2/2✓ Branch 0 taken 140186 times.
✓ Branch 1 taken 24 times.
|
140210 | for (u32 i = 0, x, y, z; i < k; ++i) { |
| 23 |
3/6✓ Branch 1 taken 140186 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 140186 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 140186 times.
✗ Branch 8 not taken.
|
140186 | std::cin >> x >> y >> z; |
| 24 | 140186 | a(x, y) = z; | |
| 25 | } | ||
| 26 | 103710 | auto is0 = [](cT_(mint) x) { return x.val() == 0; }; | |
| 27 | 24 | tifa_libs::rand_gen<u32> gen(1, u32((i32)mint::mod() - 1)); | |
| 28 |
2/4✓ Branch 1 taken 24 times.
✗ Branch 2 not taken.
✓ Branch 6 taken 24 times.
✗ Branch 7 not taken.
|
24 | std::cout << tifa_libs::det_rd(a, gen, is0) << '\n'; |
| 29 | 24 | return 0; | |
| 30 | 24 | } | |
| 31 |