knapsack.cpp: In function 'void print()':
knapsack.cpp:23:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::map<int, int, std::greater<int> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
23 | for(int i = 1; i < lis.size(); i++){
| ~~^~~~~~~~~~~~
knapsack.cpp: In function 'int main()':
knapsack.cpp:64:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::map<int, int, std::greater<int> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
64 | for(int i = 1; i < lis.size(); i++){
| ~~^~~~~~~~~~~~
knapsack.cpp:76:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<item>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
76 | for(int i = 1; i < b.size(); i++){
| ~~^~~~~~~~~~
knapsack.cpp:46:18: warning: unused variable 'wei' [-Wunused-variable]
46 | int cnt = 0, wei = a[0].w;
| ^~~
knapsack.cpp:34:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
34 | freopen("test.in","r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
knapsack.cpp:35:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
35 | freopen("test.out","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~