Rosetta Problems

小Q的棋盘

https://www.acwing.com/problem/content/2846