//poj2864 简单题
#include <iostream>
using namespace std;
int main()
{
int n, d;
cin>>n>>d;
int a[505][105];
while(n && d)
{
for(int i = 0; i < d; i++)
{
for(int j = 0; j < n; j++)
{
cin>>a[i][j];
}
}
bool ok = true;
for(int i = 0; i < n; i++)
{
ok = true;
for(int j = 0; j < d; j++)
if(!a[j][i])
ok = false;
if(ok)
break;
}
if(ok)
cout<<"yes"<<endl;
else
cout<<"no"<<endl;
cin>>n>>d;
}
return 0;
}
poj2864
最新推荐文章于 2019-07-24 08:31:58 发布