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