Rosetta Problems

糖果传递

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