GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 22 / 0 / 22
Functions: 100.0% 1 / 0 / 1
Branches: 64.7% 22 / 0 / 34

test/cpv/library-checker-linear_algebra/intersection_of_f2_vector_spaces.greedy.cpp
Line Branch Exec Source
1 // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/intersection_of_f2_vector_spaces
2 #include "../../../src/io/container/lib.hpp"
3 #include "../../../src/lalg/basis/z2/lib.hpp"
4
5 using namespace tifa_libs;
6 17 int main() {
7
1/2
✓ Branch 2 taken 17 times.
✗ Branch 3 not taken.
17 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
8 u32 t;
9
1/2
✓ Branch 1 taken 17 times.
✗ Branch 2 not taken.
17 std::cin >> t;
10
2/2
✓ Branch 0 taken 1598217 times.
✓ Branch 1 taken 17 times.
1598234 while (t--) {
11 1598217 basis_z2<32, true> a;
12 u32 n, m;
13
1/2
✓ Branch 1 taken 1598217 times.
✗ Branch 2 not taken.
1598217 std::cin >> n;
14
2/2
✓ Branch 0 taken 38482216 times.
✓ Branch 1 taken 1598217 times.
40080433 for (u32 i = 0, x; i < n; ++i) {
15
1/2
✓ Branch 1 taken 38482216 times.
✗ Branch 2 not taken.
38482216 std::cin >> x;
16 38482216 a.insert(x);
17 }
18
1/2
✓ Branch 1 taken 1598217 times.
✗ Branch 2 not taken.
1598217 std::cin >> m;
19 1598217 vec<std::bitset<32>> b;
20
1/2
✓ Branch 1 taken 1598217 times.
✗ Branch 2 not taken.
1598217 b.reserve(m);
21
2/2
✓ Branch 0 taken 38471187 times.
✓ Branch 1 taken 1598217 times.
40069404 for (u32 i = 0, x; i < m; ++i) {
22
1/2
✓ Branch 1 taken 38471187 times.
✗ Branch 2 not taken.
38471187 std::cin >> x;
23
1/2
✓ Branch 1 taken 38471187 times.
✗ Branch 2 not taken.
38471187 b.emplace_back(x);
24 }
25 1598217 auto c = meet(a, b);
26 1598217 vecu ans;
27
2/2
✓ Branch 5 taken 51142944 times.
✓ Branch 6 taken 1598217 times.
52741161 for (auto x : c.basis)
28
3/4
✓ Branch 1 taken 32356702 times.
✓ Branch 2 taken 18786242 times.
✓ Branch 5 taken 32356702 times.
✗ Branch 6 not taken.
51142944 if (x.to_ulong()) ans.push_back((u32)x.to_ulong());
29
3/6
✓ Branch 2 taken 1598217 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 1598217 times.
✗ Branch 6 not taken.
✓ Branch 9 taken 1598217 times.
✗ Branch 10 not taken.
1598217 std::cout << ans.size() << ' ' << ans << '\n';
30 1598217 }
31 17 return 0;
32 }
33