knapsack.cpp: In function 'int main()':
knapsack.cpp:43:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Item>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
43 | for (int i = 0; i < items.size(); ) {
| ~~^~~~~~~~~~~~~~
knapsack.cpp:48:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Item>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
48 | while (i < items.size() && items[i].w == g.w) {
| ~~^~~~~~~~~~~~~~
knapsack.cpp:58:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Group>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
58 | for (int i = 1; i <= groups.size(); i++) {
| ~~^~~~~~~~~~~~~~~~
knapsack.cpp:34:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
34 | scanf("%d %d", &s, &n);
| ~~~~~^~~~~~~~~~~~~~~~~
knapsack.cpp:37:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
37 | scanf("%d %d %d", &it.v, &it.w, &it.k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~