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