solutions for some codeforces.com problems