Rosetta Problems

魔幻棋盘

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