codeforces round#165 div2,A && B.