uva-11584.cpp