Help needed in Codekaze's Problem
How to solve this problem. I saw it in a contest conducted on 13 March 8:00PM-11:00PM IST .
ICPC NA North Central and South Division