From http://acm.hdu.edu.cn/discuss/problem/post/reply.php?postid=19124&messageid=1&deep=0
Goto BestCoder Home Page