Nikolay Domashenko's submission of Valid Minimum | CodeChef