Solutions for some UVa Online Judge problems