GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 14 / 0 / 14
Functions: 100.0% 3 / 0 / 3
Branches: 60.0% 6 / 0 / 10

test/cpv/library-checker-linear_algebra/inverse_matrix.mintd-bd.cpp
Line Branch Exec Source
1 #define AUTO_GENERATED
2 // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/inverse_matrix
3 #include "../../../src/lalg/ds/mat/lib.hpp"
4 #include "../../../src/lalg/mat/ge/lib.hpp"
5 #include "../../../src/lalg/mat/inv/lib.hpp"
6
7 using namespace tifa_libs;
8 CEXP u32 MOD = 998244353;
9
10 #include "../../../src/math/ds/mint/bd/lib.hpp"
11
12 using namespace tifa_libs;
13 using mint = mint_bd<__LINE__>;
14 using mat = tifa_libs::matrix<mint>;
15
16 26 int main() {
17 26 mint::set_mod(MOD);
18
1/2
✓ Branch 2 taken 26 times.
✗ Branch 3 not taken.
26 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
19 u32 n;
20
1/2
✓ Branch 1 taken 26 times.
✗ Branch 2 not taken.
26 std::cin >> n;
21 26 mat a(n, n);
22 26 std::cin >> a;
23 3825020 auto is_0 = [](cT_(mint) x) { return x.val() == 0; };
24 26 auto ge = [&is_0](mat& m, bool f) { return tifa_libs::ge_mat(m, is_0, f); };
25 26 auto res = tifa_libs::inv_mat(a, is_0, ge);
26
2/2
✓ Branch 1 taken 18 times.
✓ Branch 2 taken 8 times.
26 if (res)
27
1/2
✓ Branch 1 taken 18 times.
✗ Branch 2 not taken.
18 std::cout << res.value();
28 else
29
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 std::cout << "-1\n";
30 26 return 0;
31 26 }
32