TopCoder SRM 580 div 2, 250 AC.