Codeforces round #1, problems A, B