GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 8 / 0 / 8
Functions: 100.0% 1 / 0 / 1
Branches: 55.6% 10 / 0 / 18

test/cpv/aizu-dpl/dpl_1_b.knapsack_01.cpp
Line Branch Exec Source
1 // competitive-verifier: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/library/7/DPL/all/DPL_1_B
2 #include "../../../src/opt/knapsack/bin/lib.hpp"
3
4 using namespace tifa_libs;
5 36 int main() {
6
1/2
✓ Branch 2 taken 36 times.
✗ Branch 3 not taken.
36 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
7 u32 n, w;
8
2/4
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
36 std::cin >> n >> w;
9
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
36 vecpt<u32> a(n);
10
4/6
✓ Branch 6 taken 1667 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 1667 times.
✗ Branch 10 not taken.
✓ Branch 13 taken 1667 times.
✓ Branch 14 taken 36 times.
1703 for (auto& [v, w] : a) std::cin >> v >> w;
11
2/4
✓ Branch 2 taken 36 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 36 times.
✗ Branch 6 not taken.
36 std::cout << knapsack_01(a, w) << '\n';
12 36 return 0;
13 36 }
14