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% 6 / 0 / 6
Branches: 100.0% 6 / 0 / 6

test/cpv/library-checker-datastructure/range_add_range_min.fhq_treap_w.cpp
Line Branch Exec Source
1 // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/range_add_range_min
2 #include "../../../src/ds/bst/fhq_w/lib.hpp"
3 #include "../../../src/io/fastin/lib.hpp"
4 #include "../../../src/io/fastout/lib.hpp"
5
6 using namespace tifa_libs;
7 using T = i64;
8 using F = i64;
9
10 1057610256 auto op(T a, T b) { return min(a, b); }
11 18963464 T e() { return inf_v<T>; }
12 2665143954 auto mapping(F f, T a) { return a + f; }
13 1332571977 auto composition(F f, F g) { return f + g; }
14 813074390 F id() { return 0; }
15
16 23 int main() {
17 u32 n, q;
18 i64 x;
19 23 fin_uint >> n >> q;
20 23 fhq_treap_w<T, op, e, F, mapping, composition, id, true> tr(n + q);
21
2/2
✓ Branch 2 taken 4639492 times.
✓ Branch 3 taken 23 times.
4639515 flt_ (u32, i, 0, n) fin_int >> x, tr.insert(x);
22
2/2
✓ Branch 0 taken 4842217 times.
✓ Branch 1 taken 23 times.
4842240 for (u32 i = 0, opt, l, r; i < q; ++i) {
23 4842217 fin_uint >> opt >> l >> r;
24
2/2
✓ Branch 0 taken 2420466 times.
✓ Branch 1 taken 2421751 times.
4842217 if (!opt) fin_int >> x, tr.update(l, r - 1, x);
25 2421751 else fout << tr.query(l, r - 1) << '\n';
26 }
27 23 return 0;
28 23 }
29