solved POJ 2393