Problem knapsack
User kiwiwi
Submission Time 2026-02-19 17:22:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

knapsack.cpp: In function ‘ll knapsack(ll, ll, std::vector<Item>)’:
knapsack.cpp:35:19: error: ‘const struct std::pair<long long int, long long int>’ has no member named ‘v’
35 | ll value = item.v;
| ^
knapsack.cpp:36:20: error: ‘const struct std::pair<long long int, long long int>’ has no member named ‘w’
36 | ll weight = item.w;
| ^