当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2259:Continuous Same Game (2)

Special Judge 特殊评判
题目描述
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.
输出解释
For each test case, first output a single line containing the number of steps S. Then S lines follow, each contains two integers indicating the position of an arbitrary block of the group you want to remove.

For the i-th test case, let Ai is the total point of your scheme and Bi is the total point of the greedy strategy . Then I will calculate the average of (Ai/Bi), 1<=i<=100. You will get WA if your ouput is invalid or this average is less than 1.5.
输入样例
5 5
35552
31154
33222
21134
12314
输出样例
5
2 2
0 0
1 1
2 1
4 4

提示
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.
来自杭电HDUOJ的附加信息
Recommend lcy

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-2259

最后修改于 2020-10-25T22:51:55+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
6000/3000MS(Java/Others) 65536/32768K(Java/Others)