GCC Code Coverage Report


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

test/cpv/library-checker-linear_algebra/inverse_matrix.mints-ms.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/ms/lib.hpp"
11
12 using namespace tifa_libs;
13 using mint = mint_ms<MOD>;
14 using mat = tifa_libs::matrix<mint>;
15
16 26 int main() {
17
1/2
✓ Branch 2 taken 26 times.
✗ Branch 3 not taken.
26 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
18 u32 n;
19
1/2
✓ Branch 1 taken 26 times.
✗ Branch 2 not taken.
26 std::cin >> n;
20 26 mat a(n, n);
21 26 std::cin >> a;
22 3825020 auto is_0 = [](cT_(mint) x) { return x.val() == 0; };
23 26 auto ge = [&is_0](mat& m, bool f) { return tifa_libs::ge_mat(m, is_0, f); };
24 26 auto res = tifa_libs::inv_mat(a, is_0, ge);
25
2/2
✓ Branch 1 taken 18 times.
✓ Branch 2 taken 8 times.
26 if (res)
26
1/2
✓ Branch 1 taken 18 times.
✗ Branch 2 not taken.
18 std::cout << res.value();
27 else
28
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 std::cout << "-1\n";
29 26 return 0;
30 26 }
31