carnival.cpp: In function 'int query(std::vector<int>)':
carnival.cpp:21:11: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wformat=]
21 | printf("%d ", v.size());
| ~^ ~~~~~~~~
| | |
| int std::vector<int>::size_type {aka long unsigned int}
| %ld
carnival.cpp: In function 'int main()':
carnival.cpp:50:12: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
50 | if (out == tren.size()) lo = mid;
| ~~~~^~~~~~~~~~~~~~
carnival.cpp:54:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
54 | if (lo == v.size()) {
| ~~~^~~~~~~~~~~
carnival.cpp: In function 'int query(std::vector<int>)':
carnival.cpp:27:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
27 | scanf("%d", &x);
| ~~~~~^~~~~~~~~~
carnival.cpp: In function 'int main()':
carnival.cpp:32:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
32 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~