foo.cc: In function 'int main()':
foo.cc:10:32: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
10 | if(x%3==0||x==1&&c[1]-x!=1)
| ~~~~^~~~~~~~~~~
foo.cc:10:37: warning: array subscript 1 is above array bounds of 'int [1]' [-Warray-bounds]
10 | if(x%3==0||x==1&&c[1]-x!=1)
| ~~~^
foo.cc:5:21: note: while referencing 'c'
5 | int x,n,k=1,c[1];
| ^
foo.cc:16:36: warning: array subscript 1 is above array bounds of 'int [1]' [-Warray-bounds]
16 | else if(x%2==0&&c[1]-x!=1)
| ~~~^
foo.cc:5:21: note: while referencing 'c'
5 | int x,n,k=1,c[1];
| ^
foo.cc:18:28: warning: array subscript 1 is above array bounds of 'int [1]' [-Warray-bounds]
18 | c[1]=x;
| ~~~^
foo.cc:5:21: note: while referencing 'c'
5 | int x,n,k=1,c[1];
| ^
foo.cc:12:28: warning: array subscript 1 is above array bounds of 'int [1]' [-Warray-bounds]
12 | c[1]=x;
| ~~~^
foo.cc:5:21: note: while referencing 'c'
5 | int x,n,k=1,c[1];
| ^
foo.cc:22:23: warning: array subscript 1 is above array bounds of 'int [1]' [-Warray-bounds]
22 | if(c[1]-x==1)
| ~~~^
foo.cc:5:21: note: while referencing 'c'
5 | int x,n,k=1,c[1];
| ^
[Hydro](https://hydro.ac)提供评测服务