#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. Clr Via C#读书笔记---线程基础

    趣闻:我是一个线程:http://kb.cnblogs.com/page/542462/ 进程与线程 进程:应用程序的一个实例使用的资源的集合.每个进程都被赋予了一个虚拟地址空间. 线程:对CPU进行 ...

  2. Linux下pipe使用注意事项

    转自:http://blog.yufeng.info/archives/1485 Linux下的pipe使用非常广泛, shell本身就大量用pipe来粘合生产者和消费者的. 我们的服务器程序通常会用 ...

  3. 11g Physical Standby配置

    一,准备   Database DB_UNIQUE_NAME Oracle Net Service Name Primary PROD PROD Physical standby PRODDG PRO ...

  4. font-face使用备忘

    @font-face { font-family: 'SingleMalta'; src: url('./font/SingleMalta.ttf'); } @font-face { font-fam ...

  5. jqueryEasyUI:tabs扩展:给tabs组件绑定双击事件 分类: JqueryEasyUI 2014-09-29 14:36 537人阅读 评论(0) 收藏

    实现代码: $.extend($.fn.tabs.methods, { /** * 绑定双击事件 * @param {Object} jq * @param {Object} caller 绑定的事件 ...

  6. DNX/ASP.NET 5的xUnit入门向导

    (此文章同时发表在本人微信公众号"dotNET每日精华文章",欢迎右边二维码来关注.) 题记:想必很多人已经和我一样在使用ASP.NET 5开发真实世界的应用了,那么做好单元测试和 ...

  7. Android仿360手机卫士悬浮窗效果

    请看下图:                         首先是一个小的悬浮窗显示的是当前使用了百分之多少的内存,点击一下小悬浮窗,就会弹出一个大的悬浮窗,可以一键加速.好,我们现在就来模拟实现一下 ...

  8. Ubuntu14 搭载vim环境查看源码

    首先是下载完整的vim74,然后编译安装.遗憾的是当编译时,没有开启图形界面. 在安装新版本的Vim之前,你需要卸载原来安装的老版本Vim,依次在终端下执行下列命令: sudo apt-get rem ...

  9. Linux学习笔记(21) Linux日志管理

    1. 简介 (1) 日志服务 在CentOS 6.x中日志服务已经由rsyslogd取代了原先的syslogd服务.rsyslogd日志服务更加先进,功能更多.但是不论该服务的使用,还是日志文件的格式 ...

  10. 从DataReader中手动串行化JSON

    void WriteDataReader(StringBuilder sb, IDataReader reader) { ) { sb.Append("null"); return ...