Topcoder SRM 577 div2