Andrey Kim's submission of Max Mex | CodeChef