http://bestcoder.hdu.edu.cn/contests/contest_showproblem.php?cid=584&pid=1006
题解:ORZ Matrix67
http://www.matrix67.com/blog/archives/5296