Did anyone solve KMAX from the recent LOCAUG17 contest?

I am unable to solve it. Anyone who solved it, please explain me how to solve it. Thank you!

//