Hey guys, I cannot figure out how to solve this question https://www.codechef.com/problems/CHFWAR . Please if you find some kind of pattern or maybe whole solution, sharing would be really appreciated. Also, there is no editorial for this question on Codechef, so...asking here for help.