Rosetta Problems

欢乐宫殿

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