(简单模拟2.4.3)POJ 2864 Pascal Library(某一个环节的值决定全局的值)

2014-11-24 03:25:56 · 作者: · 浏览: 0
/*
 * POJ_2864.cpp
 *
 *  Created on: 2013年10月24日
 *      Author: Administrator
 */

#include 
  
   
#include 
   
     #include 
    
      using namespace std; const int maxn = 110; int a[maxn]; int main(){ int n,d; while(scanf("%d%d",&n,&d)!=EOF,n||d){ memset(a,1,sizeof(a)); int i,j; for(i = 0 ; i < d ; ++i){ for(j = 0 ; j < n ; ++j){ int temp; scanf("%d",&temp); if(temp == 0){ a[j] = 0; } } } bool flag = false; for(i = 0 ; i < n ; ++i){ if(a[i] != 0){ flag = true; break; } } if(flag){ printf("yes\n"); }else{ printf("no\n"); } } return 0; }