GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 15 / 0 / 15
Functions: 100.0% 3 / 0 / 3
Branches: 55.6% 10 / 0 / 18

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