将每两个格子压缩成一个大矩形的方法是
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
int t=i/2+j/2;
if(t%2==0)cout<<'#';
else cout<<'.';
}
cout<<endl;
}
例题:
https://codeforces.com/problemset/problem/1950/B
将每两个格子压缩成一个大矩形的方法是
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
int t=i/2+j/2;
if(t%2==0)cout<<'#';
else cout<<'.';
}
cout<<endl;
}
例题:
https://codeforces.com/problemset/problem/1950/B