foo.cc: In function 'int main()':
foo.cc:10:8: warning: array subscript is above array bounds [-Warray-bounds]
a[3]=n%10;
~~~^
foo.cc:11:9: warning: array subscript is above array bounds [-Warray-bounds]
sort(a+1,a+1+3);
~~~~^~~~~~~~~~~
foo.cc:11:9: warning: array subscript is above array bounds [-Warray-bounds]
foo.cc:11:9: warning: array subscript is above array bounds [-Warray-bounds]
foo.cc:12:47: warning: array subscript is above array bounds [-Warray-bounds]
if(a[1]==0&&a[2]!=0) cout<<a[2]<<a[1]<<a[3];
^
foo.cc:13:35: warning: array subscript is above array bounds [-Warray-bounds]
if(a[1]==0&&a[2]==0) cout<<a[3]<<a[1]<<a[2];
^
foo.cc:14:38: warning: array subscript is above array bounds [-Warray-bounds]
if(a[1]!=0) cout<<a[1]<<a[2]<<a[3];
^
[Hydro](https://hydro.ac)提供评测服务