GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 92.3% 12 / 0 / 13
Functions: 75.0% 3 / 0 / 4
Branches: 61.1% 11 / 0 / 18

test/cpv/aizu/3086.cpp
Line Branch Exec Source
1 // competitive-verifier: PROBLEM https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=3086
2 #include "../../../src/ds/segtree/hp/lib.hpp"
3 #include "../../../src/opt/larsch/d1/lib.hpp"
4
5 using namespace tifa_libs;
6 291385771 i64 op(i64 x, i64 y) { return std::min(x, y); }
7 void mapping(i64& x, i64 y) { x = op(x, y); }
8
9 49 int main() {
10
1/2
✓ Branch 2 taken 49 times.
✗ Branch 3 not taken.
49 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
11 u32 n, L;
12
2/4
✓ Branch 1 taken 49 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 49 times.
✗ Branch 5 not taken.
49 std::cin >> n >> L;
13
1/2
✓ Branch 1 taken 49 times.
✗ Branch 2 not taken.
49 vecii a(n);
14
3/4
✓ Branch 4 taken 2134868 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 2134868 times.
✓ Branch 9 taken 49 times.
2134917 for (auto& i : a) std::cin >> i, i = -i;
15 49 const auto inf = inf_v<i64>;
16 49 segtree_notag<i64, op, mapping> tr(inf, a);
17
2/2
✓ Branch 1 taken 15857746 times.
✓ Branch 2 taken 19860796 times.
35718591 auto ans = larsch<i64>(n, [&](u32 l, u32 r) { retif_((r < l + L), inf, tr.query(l, r)); });
18
2/4
✓ Branch 2 taken 49 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 49 times.
✗ Branch 6 not taken.
49 std::cout << -ans.back() << '\n';
19 49 return 0;
20 49 }
21