Codeforces round 252 div 2, A and B, AC.