1 #include <iostream> 2 #define MAXN 600 3 using namespace std; 4 5 int _m[MAXN][MAXN]; 6 7 int main() 8 { 9 //freopen("acm.acm","r",stdin); 10 int c; 11 int r; 12 int i; 13 int j; 14 int sum; 15 16 while(cin>>c>>r,c||r) 17 { 18 19 for(i = 0; i < r; ++ i) 20 { 21 for(j = 0; j < c; ++ j) 22 { 23 cin>>_m[i][j]; 24 } 25 } 26 27 for(j = 0; j < c; ++ j) 28 { 29 sum = 0; 30 for(i = 0; i < r; ++ i) 31 { 32 //sum += _m[i][j]; 33 if(_m[i][j] == 0) 34 { 35 break; 36 } 37 } 38 if(i == r) 39 { 40 cout<<"yes"<<endl; 41 break; 42 } 43 } 44 if(j == c) 45 { 46 cout<<"no"<<endl; 47 } 48 } 49 50 }
时间: 2024-11-05 16:22:10