Solve Codeforces Round0259 Div2C