Need intuition to solve COVDSMPL

hello coders ,
what is intuition to land on a solution for COVDSMPL?
https://www.codechef.com/JUNE20B/problems/COVDSMPL

This Question was asked 26 days ago and you just copied this-