Solutions of problems from UVa in C++