TopCoder SRM641Div2