GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 17 / 0 / 17
Functions: 100.0% 1 / 0 / 1
Branches: 64.3% 18 / 0 / 28

test/cpv/aizu-itp2/itp2_2_c.4-ary.cpp
Line Branch Exec Source
1 // competitive-verifier: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/lesson/8/ITP2/all/ITP2_2_C
2 #include "../../../src/ds/heap/d_ary/lib.hpp"
3 #include "../../../src/util/alias/others/lib.hpp"
4
5 using namespace tifa_libs;
6 CEXP int D = 4;
7
8 25 int main() {
9
1/2
✓ Branch 2 taken 25 times.
✗ Branch 3 not taken.
25 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
10 u32 n, q;
11
2/4
✓ Branch 1 taken 25 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25 times.
✗ Branch 5 not taken.
25 std::cin >> n >> q;
12
1/2
✓ Branch 1 taken 25 times.
✗ Branch 2 not taken.
25 vveci v(n);
13
2/2
✓ Branch 0 taken 2294437 times.
✓ Branch 1 taken 25 times.
2294462 flt_ (u32, i, 0, q) {
14 u32 op, t;
15
2/4
✓ Branch 1 taken 2294437 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2294437 times.
✗ Branch 5 not taken.
2294437 std::cin >> op >> t;
16
2/2
✓ Branch 0 taken 1429396 times.
✓ Branch 1 taken 865041 times.
2294437 if (op == 0) {
17 i32 x;
18
1/2
✓ Branch 1 taken 1429396 times.
✗ Branch 2 not taken.
1429396 std::cin >> x;
19
1/2
✓ Branch 2 taken 1429396 times.
✗ Branch 3 not taken.
1429396 v[t].push_back(x);
20 1429396 push_dary_heap<D>(begin(v[t]), end(v[t]));
21 } else {
22
2/2
✓ Branch 2 taken 307 times.
✓ Branch 3 taken 864734 times.
865041 if (v[t].empty()) continue;
23
2/2
✓ Branch 0 taken 482368 times.
✓ Branch 1 taken 382366 times.
864734 if (op == 1) {
24
2/4
✓ Branch 3 taken 482368 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 482368 times.
✗ Branch 7 not taken.
482368 std::cout << v[t].front() << '\n';
25 } else {
26 382366 pop_dary_heap<D>(begin(v[t]), end(v[t]));
27 382366 v[t].pop_back();
28 }
29 }
30 }
31 25 return 0;
32 25 }
33