User:Sweepline/UVa 11038.cpp