UVa OJ solutions