carnival.cpp: In function 'int main()':
carnival.cpp:23:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(ask(tmp) == tmp.size()) vec = tmp;
~~~~~~~~~^~~~~~~~~~~~~
carnival.cpp:25:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 1; i <= vec.size(); i++) a[vec[i-1]] = i;
~~^~~~~~~~~~~~~
carnival.cpp: In function 'int ask(std::vector<int>&, int)':
carnival.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &ret);
~~~~~^~~~~~~~~~~~
carnival.cpp: In function 'int main()':
carnival.cpp:18:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~