Problem UVa 573 skeleton
Problem UVa 573 solution