#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main ()
{
int n,m;
while(scanf("%d %d",&m,&n)&&m&&n)
{
int t=,flag=;
int a[][]={};
int i,j;
for(i=;i<n;i++)
for(j=;j<m;j++)
scanf("%d",&a[i][j]);
for(j=;j<m;j++)
{
t=,flag=;
for(i=;i<n;i++)
t+=a[i][j];
if(t==n){flag=;break;}
}
if(flag)
printf("yes\n");
else
printf("no\n");
}
return ;
}

poj2864的更多相关文章

  1. 模拟水题,查看二维数组是否有一列都为1(POJ2864)

    题目链接:http://poj.org/problem?id=2864 题意:参照题目 哈哈哈,这个题discuss有翻译哦.水到我不想交了. #include <cstdio> #inc ...

随机推荐

  1. C语言基础11

    函数指针的定义: 函数类型 (标识符 指针变量名)(形参列表) void  printHello( ); void printHello( ){ printf("hello world!!! ...

  2. nginx上传模块—nginx upload module-

    一. nginx upload module原理 官方文档: http://www.grid.net.ru/nginx/upload.en.html Nginx upload module通过ngin ...

  3. 10453 Make Palindrome (dp)

    Problem A Make Palindrome Input: standard input Output: standard output Time Limit: 8 seconds By def ...

  4. VMware双网卡实现虚拟机连开发板和Internet

    前面已经介绍过关于VMware产生的虚拟交换机和虚拟网卡,当宿主机拥有两个网卡时,可以让虚拟系统同时实现上网和连接开发板的功能. 首先,在设置中虚拟出两块虚拟机网卡,一块连接VMnet0交换机一块连接 ...

  5. 【UVA 10307 Killing Aliens in Borg Maze】最小生成树, kruscal, bfs

    题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=20846 POJ 3026是同样的题,但是内存要求比较严格,并是没有 ...

  6. poj 2975 Nim_最经典的Nim取石子

    题意:给你n堆石头,每次只能在一堆取最少一个石子,最后拿走最后一堆的为胜者,问胜者有多少种赢得取法 #include <iostream> #include<cstdio> u ...

  7. Longtail Hedgehog(DP)

    Longtail Hedgehog time limit per test 3 seconds memory limit per test 256 megabytes input standard i ...

  8. 项目中常用方法总结(将将DataTable数据集映射到实体对象)【转】

    本篇把项目中用到的一些通用方法总结出来, 这些方法因为经常需要在项目中用到,所以把它们归纳在一起, 形成一个.dll 文件是一个理想的选择. 这样也便于日后缩短开发周期. 一. 把一个DataGrid ...

  9. Android 自己定义 TextView drawableTop 图标与文字左对齐(效果图)

    public class DrawableTopLeftTextView extends TextView { private Paint mPaint; private float fFontHei ...

  10. Arcgis Runtime sdk for android 授权

    要下载和安装 ArcGISRuntime SDK for Android,您需要注册开发者账户,进而便拥有了访问所有功能的权限,从而实现开发和测试目的.但是,这种情况下,应用程序中的所有地图都具有水印 ...