Hi Everone , I tried problem https://community.topcoder.com/stat?c=problem_statement&pm=9728 , not able to comeup with any proper logic . I checked the editorial also, solution is not clear could someone help to understand how to approach this problem .