Efficient solutions to Project Euler Problems in C++