shangjingbo's submission of Smart Frog | CodeChef