Main.cpp: In function 'int main()':
Main.cpp:8:8: warning: too many arguments for format [-Wformat-extra-args]
8 | scanf("%d", &n, &m);
| ^~~~
Main.cpp:20:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
20 | if(idx == vec.size())
| ~~~~^~~~~~~~~~~~~
Main.cpp:27:11: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wformat=]
27 | printf("%d\n", vec.size());
| ~^ ~~~~~~~~~~
| | |
| int std::vector<int>::size_type {aka long unsigned int}
| %ld
Main.cpp:8:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
8 | scanf("%d", &n, &m);
| ~~~~~^~~~~~~~~~~~~~
Main.cpp:10:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
10 | scanf("%d", &val);
| ~~~~~^~~~~~~~~~~~
Main.cpp:14:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
14 | scanf("%d", &b[n+1-i]);
| ~~~~~^~~~~~~~~~~~~~~~~