[Topcoder] SRM 627 Div 1 500