pismo.cpp: In function 'int solve(std::vector<int>&)':
pismo.cpp:7:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<a.size(); i++){
~^~~~~~~~~
pismo.cpp: In function 'int main()':
pismo.cpp:23:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
pismo.cpp:26:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&i);
~~~~~^~~~~~~~~