carnival.cpp: In function 'int ask(std::vector<int>&)':
carnival.cpp:17:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<v.size();++i)
^
carnival.cpp: In function 'void solve(std::vector<int>&, int)':
carnival.cpp:30:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<v.size();++i)
^
carnival.cpp:35:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<v.size();++i) {
^
carnival.cpp: In function 'int ask(std::vector<int>&)':
carnival.cpp:21:18: 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:49:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^