题解:P15421 像你这样的朋友
lailai0916 · · 题解
题意简述
在
填入
解题思路
我们可以将每个格子
参考代码
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
for(int n=1;n<=270;n++)
{
int t=(n+1)%3;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
cout<<((i+j)%3==t?'x':'o');
}
cout<<'\n';
}
}
return 0;
}