carnival.cpp: In function 'int main()':
carnival.cpp:23:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
23 | if (all > used.size()) {
| ~~~~^~~~~~~~~~~~~
carnival.cpp:29:19: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
29 | mid = hi + lo + 1 >> 1;
| ~~~~~~~~^~~
carnival.cpp:14:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
14 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
carnival.cpp:22:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
22 | int all; scanf("%d", &all);
| ~~~~~^~~~~~~~~~~~
carnival.cpp:34:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
34 | int cur; scanf("%d", &cur);
| ~~~~~^~~~~~~~~~~~