http://acm.gdufe.edu.cn/Problem/read/id/1333
https://www.zhihu.com/question/29580448/answer/44874605