Finish Poj 1573

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