Finish Poj 3259

http://www.cnblogs.com/mobileliker/p/4127259.html