foo.cc: In function 'int main()':
foo.cc:15:15: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if((a[n]!=1)&&(a[n]!=-1)||(!n))
~~~~~~~~~^~~~~~~~~~~~
foo.cc:16:22: warning: second operand of conditional expression has no effect [-Wunused-value]
cout<<(a[n]>0)?a[n]:-a[n];
~~~^
foo.cc:16:24: warning: third operand of conditional expression has no effect [-Wunused-value]
cout<<(a[n]>0)?a[n]:-a[n];
^~~~~
foo.cc:30:16: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if((a[i]!=1)&&(a[i]!=-1)||(!i))
~~~~~~~~~^~~~~~~~~~~~
foo.cc:31:23: warning: second operand of conditional expression has no effect [-Wunused-value]
cout<<(a[i]>0)?a[i]:-a[i];
~~~^
foo.cc:31:25: warning: third operand of conditional expression has no effect [-Wunused-value]
cout<<(a[i]>0)?a[i]:-a[i];
^~~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。