File size: 563 Bytes
bff4ec7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Bounded Knapsack

## Description

Given item weights, values, and available multiplicities, maximize total value without exceeding the knapsack capacity.

## Input

The verification-case input consists of parallel `weights`, `values`, and `counts` arrays, item count `n`, capacity, and work buffers.

## Output

The function produces the maximum achievable total value.

## Constraints

- $0 \le n,capacity \le 1000$; weights are positive, values and counts are nonnegative.

## Source

Classical algorithmic problem reconstructed from the verified C artifact.