Codeforces975Solution