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