foo.cc: In function 'int main()':
foo.cc:30:9: error: expected ',' or ';' before 'if'
30 | if(a[i] == 0)
| ^~
foo.cc:32:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
32 | if(a[i] == 2)
| ^~
foo.cc:34:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
34 | if(a[i] == 3){
| ^~
foo.cc:35:10: error: 'a3' was not declared in this scope; did you mean 'p3'?
35 | ans += a3[i + n / 2] - p3;
| ^~
| p3
foo.cc:26:7: warning: unused variable 'p' [-Wunused-variable]
26 | int p = (i == 0 ? 0 : s2[i - 1]);
| ^
foo.cc:41:1: error: expected '}' at end of input
41 | }
| ^
foo.cc:5:11: note: to match this '{'
5 | int main(){
| ^
[Hydro](https://hydro.ac)提供评测服务