时间限制 4000 ms 内存限制 65536 KB
题目描述
Alice and Bob are old friends in game theory. This afternoon they meet in Starbucks, each ordered a cup of coffee and decided to start a new game. They line N cups on the table, each containing Ai stones. Different from the usual stone games, each cup is numbered from 0 to N−1 , and has an integer Ci