Ming-Tian Yang's submission of Optimal Point | CodeChef