Solve Codeforces Round0256 Div2D