knapsack.cpp:57: warning: "task" redefined
57 | #define task "a"
|
knapsack.cpp:56: note: this is the location of the previous definition
56 | #define task ""
|
knapsack.cpp: In function 'void nhap()':
knapsack.cpp:45:19: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
45 | for (int i=1;i<b.size();i++)
| ~^~~~~~~~~
knapsack.cpp: In function 'int main()':
knapsack.cpp:60:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
60 | freopen(task".inp","r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
knapsack.cpp:61:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
61 | freopen(task".out","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~