TopCoder SRM 589 Div2 500