TopCoder SRM 609, 250 AC.e