solved POJ1065