TopCoder SRM 551 div 2, 250 AC.