Can someone explain how to solve 2290E - Avalanche using the Sprague-Grundy theorem? The heaps are not independent of each other, so I don't know how to approach it.
I tried to understand the solution from the tutorial, but I couldn't. I also looked into game theory just so I could solve this question. I saw some reds using a method that I felt was closer to Grundy, but I couldn't understand it.
It would be very helpful if someone could explain it.







