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

建议使用的浏览器:

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

2119:Matrix

题目描述
Give you a matrix(only contains 0 or 1),every time you can select a row or a column and delete all the '1' in this row or this column .

Your task is to give out the minimum times of deleting all the '1' in the matrix.
输入解释
There are several test cases.

The first line contains two integers n,m(1<=n,m<=100), n is the number of rows of the given matrix and m is the number of columns of the given matrix.
The next n lines describe the matrix:each line contains m integer, which may be either ‘1’ or ‘0’.

n=0 indicate the end of input.
输出解释
For each of the test cases, in the order given in the input, print one line containing the minimum times of deleting all the '1' in the matrix.
输入样例
3 3 
0 0 0
1 0 1
0 1 0
0
输出样例
2
来自杭电HDUOJ的附加信息
Author Wendell
Recommend 威士忌

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

源链接: HDU-2119

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

共提交 0

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