2176.cpp
来自「这是哈尔滨工业大学acmOJ的源代码」· C++ 代码 · 共 26 行
CPP
26 行
/* This Code is Submitted by wywcgs for Problem 2176 on 2006-03-21 at 13:51:05 */
#include <cstdio>
#include <algorithm>
using namespace std;
const int MAX = 128;
int main()
{
int i, j, n, m;
bool all[MAX];
while(scanf("%d %d", &n, &m) != EOF && n != 0) {
memset(all, true, sizeof(all));
for(i = 0; i < m; i++)
for(j = 0; j < n; j++) {
int att; scanf("%d", &att);
if(!att) all[j] = false;
}
for(i = 0; !all[i] && i < n; i++) ;
printf("%s\n", i == n ? "no" : "yes");
}
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?