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: 55.0% 11 / 0 / 20

test/cpv/aizu-dpl/dpl_1_g.cpp
Line Branch Exec Source
1 // competitive-verifier: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/library/7/DPL/all/DPL_1_G
2 #include "../../../src/opt/knapsack/mixed/lib.hpp"
3
4 using namespace tifa_libs;
5 50 int main() {
6
1/2
✓ Branch 2 taken 50 times.
✗ Branch 3 not taken.
50 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
7 u32 n, w;
8
2/4
✓ Branch 1 taken 50 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 50 times.
✗ Branch 5 not taken.
50 std::cin >> n >> w;
9 50 knapsack_mixed<i32> kn(w);
10
2/2
✓ Branch 0 taken 2896 times.
✓ Branch 1 taken 50 times.
2946 for (u32 i = 0; i < n; ++i) {
11 i32 v;
12 u32 w, m;
13
3/6
✓ Branch 1 taken 2896 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2896 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 2896 times.
✗ Branch 8 not taken.
2896 std::cin >> v >> w >> m;
14 2896 kn.add(w, v, m);
15 }
16
3/6
✓ Branch 2 taken 50 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 50 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 50 times.
✗ Branch 10 not taken.
50 std::cout << *std::ranges::max_element(kn.result()) << '\n';
17 50 return 0;
18 50 }
19