A c++ implementation of the practice in http://cxsjsxmooc.openjudge.cn/warcraft1/A/