Topcoder SRM#582 Div2-Easy