Karthik's submission of Bear and Segment 01 | CodeChef