一次只能拿一个?“边上”是什么意思?是两头吗?有不能拿的时候吗? 还有没有人与我一样有疑问,还是我特别笨呢?我有点担心我的理解力了。 |
如果币值都一样的话,平。 如果币值不一样的话,一次拿一个,先拿的可以保证自己拿到最大面额的钱,会赢。 如果有51枚硬币的话,先拿的没法保证自己拿到最大面额的钱,可能会输。 |
那好象就题目太简单了。就没想到硬币的面值会不一样。确实是笨。 |
Understand. I just use it as one example. It is the same as that there are four coins. The first picker can always get the maximum total. So the stategy of the first picker is to seperate the 50 coins into twelve groups consisting 4 coin in each group. Make sure he get the maximum total of each four coins. Then choose the higher value one between the last two. |
I see. It is actually simpler than your approach. |
50 coins, no positive way. 51 coins, possible |
50个硬币,先拿有不败策略: 将50个硬币从左到右编号,如果奇数号的硬币的总值大于偶数号的硬币总价值, A 先拿1号,否则拿50号,A一定可以赢。如果相等, 随便拿那边,不会败。 因为一开始A拿单号,B无论从那边拿都是偶数号,A可以始终保持奇数号。所以最后,一个拿的是奇数号的硬币的总值,另一个拿的是偶数号的硬币的总值。 如果51个硬币,没有不败的策略,比如:1,5,1,5,。。。,1,5,1,5,1 无论A从那边拿一定输。
|
I don't understand, why this is the same as 4 coins, the 2nd picker might not follow the groups the 1st picker divided. And, for 4 coins, 1st picker may take one from either side, but if the 4 coins connect with other group, the 1st picker could only take one from one side. |
欢迎光临 珍珠湾ART (http://art.zhenzhubay.com/) | Powered by Discuz! X3 |