Solutions for problems from codeforces.com in C++