Solutions to Problems on CodeEval in python and C++