foo.cc:24:5: error: redefinition of ‘int n’
24 | int n,a[1001][1001],f[1001][1001];
| ^
foo.cc:3:5: note: ‘int n’ previously declared here
3 | int n,a[1001][1001],f[1001][1001];
| ^
foo.cc:24:7: error: redefinition of ‘int a [1001][1001]’
24 | int n,a[1001][1001],f[1001][1001];
| ^
foo.cc:3:7: note: ‘int a [1001][1001]’ previously declared here
3 | int n,a[1001][1001],f[1001][1001];
| ^
foo.cc:24:21: error: redefinition of ‘int f [1001][1001]’
24 | int n,a[1001][1001],f[1001][1001];
| ^
foo.cc:3:21: note: ‘int f [1001][1001]’ previously declared here
3 | int n,a[1001][1001],f[1001][1001];
| ^
foo.cc:25:5: error: redefinition of ‘int main()’
25 | int main(){
| ^~~~
foo.cc:4:5: note: ‘int main()’ previously defined here
4 | int main(){
| ^~~~