Codeforces Round #209 (Div. 2) A. Table
#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的更多相关文章
- 贪心 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 ...
- Codeforces Round #345 (Div. 1) C. Table Compression dp+并查集
题目链接: http://codeforces.com/problemset/problem/650/C C. Table Compression time limit per test4 secon ...
- Codeforces Round #345 (Div. 2) E. Table Compression 并查集
E. Table Compression 题目连接: http://www.codeforces.com/contest/651/problem/E Description Little Petya ...
- 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 ...
- 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 ...
- Codeforces Round #144 (Div. 2) D table
CodeForces - 233D 题目大意给你一个n*m 的矩阵,要求你进行涂色,保证每个n*n的矩阵内都有k个点被涂色. 问你一共有多少种涂色方案. n<=100 && m& ...
- 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 ...
- 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 ...
- 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 ...
随机推荐
- DOM – 7.动态创建DOM + 8.innerText innerHTML value
7.动态创建DOM 8.innerText innerHTML value 7+8 练习:案例:点击按钮动态增加网站列表,分两列,第一列为网站的名字,第二列为带网站超链接的网站名.增加三行常见网站 ...
- [webkit移动开发笔记]之如何去除android上a标签产生的边框(转)
转载地址:http://www.cnblogs.com/PeunZhang/archive/2013/02/28/2907708.html 去年年底,做完最后一个项目就可以开开心心回家,可是在测试阶段 ...
- HTML5学习之视频与音频(三)
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...
- ExcelReport第二篇:ExcelReport源码解析
导航 目 录:基于NPOI的报表引擎——ExcelReport 上一篇:使用ExcelReport导出Excel 下一篇:扩展元素格式化器 概述 针对上一篇随笔收到的反馈,在展开对ExcelRep ...
- MVC4 使用概述
1.Bundle使用: http://www.cnblogs.com/inline/p/3897256.html 2.MVC总结: http://www.cnblogs.com/xlhblogs/ar ...
- 【JAVA线程间通信技术】
之前的例子都是多个线程执行同一种任务,下面开始讨论多个线程执行不同任务的情况. 举个例子:有个仓库专门存储货物,有的货车专门将货物送往仓库,有的货车则专门将货物拉出仓库,这两种货车的任务不同,而且为了 ...
- 湘潭邀请赛 Hamiltonian Path
湘潭邀请赛的C题,哈密顿路径,边为有向且给定的所有边起点小于终点,怎么感觉是脑筋急转弯? 以后一定要牢记思维活跃一点,把复杂的事情尽量简单化而不是简单的事情复杂化. #include<cstdi ...
- git 创建本地分支,然后推送到服务器上
git checkout -b crm-2.repair-callback.phoneSet git checkout -b crm-2.repair-callback.RepairHis git p ...
- PHP检测终端设备是平板、手机还是电脑
<?php $ua = $_SERVER['HTTP_USER_AGENT']; function userAgent($ua){ $iphone = strstr(strtolower($ua ...
- APUE包含头文件"apue.h"问题
下载源码 从unix高级编程书籍官网下载书籍的上的所有源码. wget http://www.apuebook.com/src.tar.gz 解压这个文件 tar -zxvf src.tar.gz 解 ...