Java solutions for poj.org