C++ Codes for UVA Problems