TopCoder SRM 597 div2, 250 AC.