GCC Code Coverage Report


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

test/cpv/aizu-dsl/dsl_2_b.trie01.cpp
Line Branch Exec Source
1 // competitive-verifier: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/library/3/DSL/all/DSL_2_B
2 #include "../../../src/ds/trie01/lib.hpp"
3
4 using namespace tifa_libs;
5 20 int main() {
6
1/2
✓ Branch 2 taken 20 times.
✗ Branch 3 not taken.
20 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
7 u32 n, q;
8
2/4
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
20 std::cin >> n >> q;
9 20 trie01 bt(21);
10
2/2
✓ Branch 0 taken 723991 times.
✓ Branch 1 taken 20 times.
724011 for (u32 i = 0, c, x, y; i < q; ++i) {
11
3/6
✓ Branch 1 taken 723991 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 723991 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 723991 times.
✗ Branch 8 not taken.
723991 std::cin >> c >> x >> y;
12
2/2
✓ Branch 0 taken 412584 times.
✓ Branch 1 taken 311407 times.
723991 if (c == 0) bt.add(x, (i32)y);
13
3/6
✓ Branch 0 taken 311407 times.
✗ Branch 1 not taken.
✓ Branch 5 taken 311407 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 311407 times.
✗ Branch 9 not taken.
311407 else if (c == 1) std::cout << bt.count_less(y + 1) - bt.count_less(x) << "\n";
14 }
15 20 return 0;
16 20 }
17