#include <iostream>
#include <vector> using namespace std; int main(){
int n,m;
cin >> n >> m;
int a[][];
bool flag = false;
for(int i = ; i < n ; ++ i){
for(int j = ; j < m ; ++ j){
cin >> a[i][j];
}
}
for(int j = ; j < m; ++ j){
if(a[][j] || a[n-][j]){
flag = true;
break;
}
}
for(int i = ; i < n ; ++ i){
if(a[i][] || a[i][m-]){
flag = true;
break;
}
}
if(flag) cout<<<<endl;
else cout<<<<endl;
}

Codeforces Round #209 (Div. 2) A. Table的更多相关文章

  1. 贪心 Codeforces Round #273 (Div. 2) C. Table Decorations

    题目传送门 /* 贪心:排序后,当a[3] > 2 * (a[1] + a[2]), 可以最多的2个,其他的都是1个,ggr,ggb, ggr... ans = a[1] + a[2]; 或先2 ...

  2. Codeforces Round #345 (Div. 1) C. Table Compression dp+并查集

    题目链接: http://codeforces.com/problemset/problem/650/C C. Table Compression time limit per test4 secon ...

  3. Codeforces Round #345 (Div. 2) E. Table Compression 并查集

    E. Table Compression 题目连接: http://www.codeforces.com/contest/651/problem/E Description Little Petya ...

  4. Codeforces Round #273 (Div. 2)-C. Table Decorations

    http://codeforces.com/contest/478/problem/C C. Table Decorations time limit per test 1 second memory ...

  5. codeforces Codeforces Round #345 (Div. 1) C. Table Compression 排序+并查集

    C. Table Compression Little Petya is now fond of data compression algorithms. He has already studied ...

  6. Codeforces Round #144 (Div. 2) D table

    CodeForces - 233D 题目大意给你一个n*m 的矩阵,要求你进行涂色,保证每个n*n的矩阵内都有k个点被涂色. 问你一共有多少种涂色方案. n<=100 && m& ...

  7. Codeforces Round #209 (Div. 2)A贪心 B思路 C思路+快速幂

    A. Table time limit per test 1 second memory limit per test 256 megabytes input standard input outpu ...

  8. codeforces 的 Codeforces Round #273 (Div. 2) --C Table Decorations

    C. Table Decorations time limit per test 1 second memory limit per test 256 megabytes input standard ...

  9. Codeforces Round #273 (Div. 2)C. Table Decorations 数学

    C. Table Decorations   You have r red, g green and b blue balloons. To decorate a single table for t ...

随机推荐

  1. 注意kvm在安装虚机的时候不能把存放虚机的文件放在/root 下面

    如果放在/root下面会报错: WARNING KVM acceleration not available, using 'qemu' Starting install... Creating st ...

  2. SessionState详解 session有效期时间:默认20分

    为当前应用程序配置会话状态设置. configuration 元素(常规设置架构)   system.web 元素(ASP.NET 设置架构)     sessionState 元素(ASP.NET ...

  3. Linux下Vi/Vim使用笔记

    启动和关闭vim vi 打开 Vi/Vim 打开 Vi/Vim 并加载文件 <file> vi <file> vim编辑器的三种模式:一般模式.编辑模式和命令行模式在一般模式中 ...

  4. Delphi中的接口和抽象类

    参考:http://blog.csdn.net/xinzheng_wang/article/details/6058643 接口:Interface Delphi中接口中的关键字Interface,但 ...

  5. ckplayer视频播放插件使用

    研究ckplayer插件播放视频,播放视频需要配置信息修改如下: 1.设置ckplayer.js中的logo: 'null' 可以隐藏视频播放头部的图标: 2.设置ckplayer.js中的ckcpt ...

  6. 取得表中数据的insert语句

    Build Insert Statements for the Existing Data in Tables 下面这个脚本实现了取得一个非空表中的所有insert语句 This script bui ...

  7. 把浏览器的私有模式添加到VS中

    题记:在用VS进行Web开发的时候,常常希望VS的调试不会对浏览器造成固定的影响,那么使用浏览器的私有模式来启动就很有必要. 前几天SCOTT HANSELMAN分享了一个开发Web应用程序的小技巧, ...

  8. ubuntu kylin中如何截图

    windows操作系统中,我通常使用的截图工具是QQ的“ctrl+alt+a”快捷键.但是在ubuntu中,linux qq常年不更新,我也就彻底放弃了使用了,反正ubuntu通常只是拿来开发.其实没 ...

  9. 第一个java程序hello world

    首先需要配置环境,没配置的请参考:详细配置教程:http://www.cnblogs.com/qq1871707128/p/6047232.html 切入主题: java基础首先得了解基本的dos命令 ...

  10. 让sql语句不排序,按照in语句的顺序返回结果

    SELECT * FROM EVENT WHERE eventId IN(443,419,431,440,420,414,509)  ORDER BY INSTR(',443,419,431,440, ...