Solutions to UVa Online Judge coding problems