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% 1 / 0 / 1
Branches: 58.3% 14 / 0 / 24

test/cpv/aizu-alds1/alds1_9_c.4-ary.cpp
Line Branch Exec Source
1 // competitive-verifier: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/lesson/1/ALDS1/all/ALDS1_9_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 4 int main() {
9
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
10 4 strn s;
11 4 vecu v;
12
3/6
✓ Branch 1 taken 2002045 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2002045 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 2002045 times.
✗ Branch 7 not taken.
2002045 while (std::cin >> s) {
13
3/4
✓ Branch 1 taken 2002045 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 2002041 times.
2002045 if (s == "end") break;
14
3/4
✓ Branch 1 taken 2002041 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1501158 times.
✓ Branch 4 taken 500883 times.
2002041 if (s[0] == 'i') {
15 u32 x;
16
1/2
✓ Branch 1 taken 1501158 times.
✗ Branch 2 not taken.
1501158 std::cin >> x;
17
1/2
✓ Branch 1 taken 1501158 times.
✗ Branch 2 not taken.
1501158 v.push_back(x);
18 1501158 push_dary_heap<D>(begin(v), end(v));
19 } else {
20 500883 pop_dary_heap<D>(begin(v), end(v));
21
2/4
✓ Branch 2 taken 500883 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 500883 times.
✗ Branch 6 not taken.
500883 std::cout << v.back() << '\n';
22 500883 v.pop_back();
23 }
24 }
25 4 return 0;
26 4 }
27