invknapsack.cpp: In function ‘int main()’:
invknapsack.cpp:38:31: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘std::vector<int>::size_type {aka long unsigned int}’ [-Wformat=]
printf("%d %d\n", L.size(), K);
^
invknapsack.cpp:39:14: error: range-based ‘for’ loops are not allowed in C++98 mode
for(int c : L) printf("%d ", c);
^
invknapsack.cpp:24:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld", &R);
^