growing.cpp: In function 'void solve()':
growing.cpp:43:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i=0;i<loc.size();i++) l[i] = ((i)?l[i-1]:0LL)+1LL*(loc[i]-i);
^
growing.cpp:44:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i=(int)loc.size()-1;i>=0;i--) r[i] = ((i+1==loc.size())?0LL:r[i+1])+1LL*(sz-(loc.size()-i)-loc[i]);
^
growing.cpp:46:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i=0;i+1<loc.size();i++) if (mini>l[i]+r[i+1]) mini=l[i]+r[i+1];
^
growing.cpp: In function 'int main()':
growing.cpp:54:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^
growing.cpp:55:42: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (i=0;i<n;i++) scanf("%d",&arr[i]);
^