foo.cc: In function 'int main()':
foo.cc:15:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for(int i=1;i<=n;++i)
^~~
foo.cc:19:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
cout<<ans<<endl;
^~~~
foo.cc:11:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
foo.cc:12:28: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=1;i<=n;++i)scanf("%d",&a[i]);
~~~~~^~~~~~~~~~~~
Found 6 testcases.
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。