poj-1837.cpp Accepted and Described