TopCoder SRM 528 div 1, 250 AC.