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

建议使用的浏览器:

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

6513:Reverse It

题目描述
Taotao is a boy who is addicted to cards. He comes up with a card-related problem. As usual, Taotao can't solve the problem independently. Thus, he asks your help.
Taotao places n rows and m columns of cards on the desktop. Each card may be face up or it may be reverse side up. Taotao can perform at most two operations. He selects a rectangle of any size in the desktop for each operation and reverses cards in the rectangle. And he wants to know how many different types of card placement he can get. Two card placements are regarded as different only if there is at least one card in the same position reversed.
输入解释
There are multiple test cases.
For each test case, first line contains two integers n, m(1<=n, m<=100).
The next n lines each contain m digitals. '1' represents the card is face up. '0' represents the card is reverse side up.
输出解释
For each test case, you should output one integer represents the number of different card placements.
输入样例
1 2
10
输出样例
4

提示
4 different card placements in the sample are 00, 10, 01, 11.
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-6513

最后修改于 2020-10-25T23:31:59+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)