add poj1159 (dp, two methods)