MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / main

Function main

Dynamic Programming Optimizations/Bounded Knapsack.cpp:36–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 return ans;
35}
36int32_t main() {
37 int i, j, k, n, m;
38 n = 10;
39 int W = 100;
40 vector<int> ps(n), ws(n), ms(n);
41 for (int i = 0; i < n; ++i) {
42 ps[i] = rand() % n + 1;
43 ws[i] = rand() % n + 1;
44 ms[i] = rand() % n + 1;
45 }
46 cout << boundedKnapsack(ps, ws, ms, W) << endl;
47 return 0;
48}

Callers

nothing calls this directly

Calls 1

boundedKnapsackFunction · 0.85

Tested by

no test coverage detected