UVa 10670 Accepted