knapsack.cpp: In function 'int main()':
knapsack.cpp:15:15: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
15 | scanf("%d%d",&n,&k);
| ~^ ~~
| | |
| int* long long int*
| %lld
knapsack.cpp:15:17: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
15 | scanf("%d%d",&n,&k);
| ~^ ~~
| | |
| int* long long int*
| %lld
knapsack.cpp:18:43: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
18 | for(int i = 1; i <= n; i++) scanf("%d",&W[i]);
| ~^ ~~~~~
| | |
| | long long int*
| int*
| %lld
knapsack.cpp:19:43: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
19 | for(int i = 1; i <= n; i++) scanf("%d",&V[i]);
| ~^ ~~~~~
| | |
| | long long int*
| int*
| %lld
knapsack.cpp:20:43: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
20 | for(int i = 1; i <= n; i++) scanf("%d",&C[i]);
| ~^ ~~~~~
| | |
| | long long int*
| int*
| %lld
knapsack.cpp:33:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
33 | while(ptr < lst.size() and copy * cur <= i){
| ~~~~^~~~~~~~~~~~
knapsack.cpp:49:16: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
49 | printf("%d \n",ans);
| ~^ ~~~
| | |
| int long long int
| %lld
knapsack.cpp:15:12: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | scanf("%d%d",&n,&k);
| ~~~~~^~~~~~~~~~~~~~
knapsack.cpp:18:40: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
18 | for(int i = 1; i <= n; i++) scanf("%d",&W[i]);
| ~~~~~^~~~~~~~~~~~
knapsack.cpp:19:40: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
19 | for(int i = 1; i <= n; i++) scanf("%d",&V[i]);
| ~~~~~^~~~~~~~~~~~
knapsack.cpp:20:40: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
20 | for(int i = 1; i <= n; i++) scanf("%d",&C[i]);
| ~~~~~^~~~~~~~~~~~