http://codeforces.com/problemset/problem/386/D
386D Game with Points
原文:http://www.cnblogs.com/tchn/p/3529832.html