uva-11825.cpp