TopCoder SRM 615 div 2, 500 AC.