knapsack.cpp: In function 'int main()':
knapsack.cpp:25:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
25 | for(int i = 0; i < baha.size(); ++i){
| ~~^~~~~~~~~~~~~
knapsack.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
6 | scanf("%d%d", &S, &n);
| ~~~~~^~~~~~~~~~~~~~~~
knapsack.cpp:9:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
9 | scanf("%d%d%d", &v, &w, &k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~
knapsack.cpp:17:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
17 | scanf("%d%d%d", &v, &w, &k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~