1333A - Little Artem
28 Jan 2021 — Tags: None
Click to show code.
using namespace std;
int main(void)
{
int t, n, m;
cin >> t;
while (t--)
{
cin >> n >> m;
bool black = true;
for (int row = 0; row < n; ++row)
{
for (int col = 0; col < m; ++col)
{
if (row == 0 and col == 1 and (n * m) % 2 == 0)
cout << (black ? "W" : "B");
else
cout << (black ? "B" : "W");
black = !black;
}
cout << endl;
}
}
return 0;
}