首页 > ACM题库 > HDU-杭电 > hdu 2259 Continuous Same Game (2)待解决[解题报告]C++
2014
01-04

hdu 2259 Continuous Same Game (2)待解决[解题报告]C++

Continuous Same Game (2)

问题描述 :

After repeated attempts, LL finds the greedy strategy is very awful in practice. Even there is no apparent evidence to proof it is better than a random one. So he has to drop this strategy and try to discover a better one.

输入:

There are 100 test cases. Each test case begins with two integers n,m ( 5<=n,m<=20 ), which is the size of the board. Then n lines follow, each contains m characters, indicating the color of the block. There are 5 colors, and each with equal probability.

输出:

There are 100 test cases. Each test case begins with two integers n,m ( 5<=n,m<=20 ), which is the size of the board. Then n lines follow, each contains m characters, indicating the color of the block. There are 5 colors, and each with equal probability.

样例输入:

5 5
35552
31154
33222
21134
12314

样例输出:

5
2 2
0 0
1 1
2 1
4 4

Hint
35552 35000 00000 00000 00000 00000 31154 31552 05552 00002 00002 00000 33222 33154 01154 01104 00004 00000 21134 21134 21134 21134 20034 20030 12314 12314 12314 12314 12314 12312 The total point is 6+12+12+12+6=48.


  1. Thanks for taking the time to examine this, I really feel strongly about it and love studying a lot more on this topic. If possible, as you acquire experience

  2. 你的理解应该是:即使主持人拿走一个箱子对结果没有影响。这样想,主持人拿走的箱子只是没有影响到你初始选择的那个箱子中有奖品的概率,但是改变了其余两个箱子的概率分布。由 1/3,1/3 变成了 0, 2/3

  3. 第一句可以忽略不计了吧。从第二句开始分析,说明这个花色下的所有牌都会在其它里面出现,那么还剩下♠️和♦️。第三句,可以排除2和7,因为在两种花色里有。现在是第四句,因为♠️还剩下多个,只有是♦️B才能知道答案。