Selected UVa problem solution