codeforces Round#164,div2.A && B && C.