solutions to some codeforces problems