User:Aroup/UVa 1213.cpp