Can any explain how to approach the CHGORAM2 problem. The prerequisites and optimal time complexity.
https://www.lydsy.com/JudgeOnline/problem.php?id=4543