foo.cc:1:1: error: expected unqualified-id before 'for'
for(int k=1;k<i;k++)
^~~
foo.cc:1:13: error: 'k' does not name a type
for(int k=1;k<i;k++)
^
foo.cc:1:17: error: 'k' does not name a type
for(int k=1;k<i;k++)
^
foo.cc:5:3: error: expected unqualified-id before 'for'
for(int j=1;j<=(n-i)*2+1;j++)
^~~
foo.cc:5:15: error: 'j' does not name a type
for(int j=1;j<=(n-i)*2+1;j++)
^
foo.cc:5:28: error: 'j' does not name a type
for(int j=1;j<=(n-i)*2+1;j++)
^
foo.cc:9:3: error: 'cout' does not name a type
cout<<endl;
^~~~
[Hydro](https://hydro.ac)提供评测服务