carnival.cpp: In function 'int query(const std::vector<int>&, int)':
carnival.cpp:23:29: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type {aka long unsigned int}' [-Wformat=]
printf("%d", rep.size() + 1);
~~~~~~~~~~~~~~^
carnival.cpp:24:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<rep.size(); i++) printf(" %d", rep[i]);
~^~~~~~~~~~~
carnival.cpp: In function 'int dc(const std::vector<int>&, int)':
carnival.cpp:38:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<rep.size(); i++){
~^~~~~~~~~~~
carnival.cpp:43:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(query(half1, u) == half1.size()) return dc(half1, u);
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
carnival.cpp: In function 'int main()':
carnival.cpp:55:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(query(rep, i) == rep.size()) join(i, dc(rep, i));
~~~~~~~~~~~~~~^~~~~~~~~~~~~
carnival.cpp: In function 'int query(const std::vector<int>&, int)':
carnival.cpp:27:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &x);
~~~~~^~~~~~~~~~
carnival.cpp: In function 'int main()':
carnival.cpp:48:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~