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% 2 / 0 / 2
Branches: 58.3% 7 / 0 / 12

test/cpv/library-checker-linear_algebra/characteristic_polynomial.mintd-md64.cpp
Line Branch Exec Source
1 #define AUTO_GENERATED
2 // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/characteristic_polynomial
3 #include "../../../src/io/container/lib.hpp"
4 #include "../../../src/lalg/mat/charpoly/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 28 int main() {
16 28 mint::set_mod(MOD);
17
1/2
✓ Branch 2 taken 28 times.
✗ Branch 3 not taken.
28 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
18 u32 n;
19
1/2
✓ Branch 1 taken 28 times.
✗ Branch 2 not taken.
28 std::cin >> n;
20
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 27 times.
28 if (n == 0) {
21
1/2
✓ Branch 1 taken 1 time.
✗ Branch 2 not taken.
1 std::cout << "1\n";
22 1 return 0;
23 }
24 27 mat a(n, n);
25 27 std::cin >> a;
26 4743739 auto is_0 = [](cT_(mint) x) { return x.val() == 0; };
27
2/4
✓ Branch 1 taken 27 times.
✗ Branch 2 not taken.
✓ Branch 6 taken 27 times.
✗ Branch 7 not taken.
27 std::cout << tifa_libs::charpoly(a, is_0) << '\n';
28 27 return 0;
29 27 }
30