uva 10071.cpp