TopCoder SRM 591 div 2, 250 AC.