knapsack.cpp: In function 'int main()':
knapsack.cpp:27:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
27 | for (int i=0; i < v.size(); i++) {
| ~~^~~~~~~~~~
knapsack.cpp:34:22: warning: comparison of integer expressions of different signedness: 'long int' and 'std::vector<long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
34 | for (long i=1; i <= v.size(); i++) {
| ~~^~~~~~~~~~~
knapsack.cpp:8:58: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
8 | std::vector<long> v, w; int s, n, x, y, z; std::scanf("%d %d", &s, &n); long t = 0;
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~
knapsack.cpp:11:19: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
11 | std::scanf("%d %d %d", &y, &z, &x);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~