UVa 10603 accepted