GCC Code Coverage Report


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

test/cpv/library-checker-linear_algebra/system_of_linear_equations.mintd-md64.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/md64/lib.hpp"
10
11 using namespace tifa_libs;
12 using mint = mint_md64<__LINE__>;
13 using mat = tifa_libs::matrix<mint>;
14
15 27 int main() {
16 27 mint::set_mod(MOD);
17
1/2
✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
27 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
18 u32 n, m;
19
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;
20 27 mat a(n, m), b(n, 1);
21 27 std::cin >> a >> b;
22
23 1029950 auto is_0 = [](cT_(mint) x) { return x.val() == 0; };
24 27 auto ge = [&is_0](mat& m, bool f) { return tifa_libs::ge_mat(m, is_0, f); };
25
26 27 auto res_ = tifa_libs::leqs_solver(a, b, is_0, ge);
27
2/2
✓ Branch 1 taken 6 times.
✓ Branch 2 taken 21 times.
27 if (!res_)
28
1/2
✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
6 std::cout << "-1\n";
29 else {
30
1/2
✓ Branch 1 taken 21 times.
✗ Branch 2 not taken.
21 mat& res = res_.value();
31
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';
32
1/2
✓ Branch 3 taken 21 times.
✗ Branch 4 not taken.
21 std::cout << res.trans() << '\n';
33 }
34 27 return 0;
35 27 }
36