Codeforces Round #192 (Div. 2) A. Cakeminator
#include <iostream>
#include <vector>
using namespace std; int main(){
int r,c;
cin >>r>>c;
vector<bool> row(r,false),col(c,false);
char ch;
for(int i = ; i < r; i ++ ){
for(int j = ; j < c; j ++){
cin >> ch;
if(ch == 'S') row[i] = col[j] = true;
}
}
int cnt = ;
for(int i = ; i < r; i ++){
for(int j = ; j < c; j ++ ){
if(!row[i] || ! col[j] ) cnt++;
}
}
cout<<cnt<<endl;
return ;
}
Codeforces Round #192 (Div. 2) A. Cakeminator的更多相关文章
- Codeforces Round #192 (Div. 2) A. Cakeminator【二维字符数组/吃掉cake,并且是一行或者一列下去,但是该行/列必须没有草莓的存在】
A. Cakeminator time limit per test 1 second memory limit per test 256 megabytes input standard input ...
- Codeforces Round #192 (Div. 2) (330A) A. Cakeminator
题意: 如果某一行没有草莓,就可以吃掉这一行,某一列没有也可以吃点这一列,求最多会被吃掉多少块蛋糕. //cf 192 div2 #include <stdio.h> #include & ...
- Codeforces Round #192 (Div. 1) C. Graph Reconstruction 随机化
C. Graph Reconstruction Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/3 ...
- Codeforces Round #192 (Div. 1) B. Biridian Forest 暴力bfs
B. Biridian Forest Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/329/pr ...
- Codeforces Round #192 (Div. 1) A. Purification 贪心
A. Purification Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/329/probl ...
- [Codeforces Round #192 (Div. 2)] D. Biridian Forest
D. Biridian Forest time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- Codeforces Round #192 (Div. 2) (330B) B.Road Construction
题意: 要在N个城市之间修建道路,使得任意两个城市都可以到达,而且不超过两条路,还有,有些城市之间是不能修建道路的. 思路: 要将N个城市全部相连,刚开始以为是最小生成树的问题,其实就是一道简单的题目 ...
- Codeforces Round #192 (Div. 2)
吐槽一下,这次的CF好简单啊. 可是我为什么这么粗心这么大意这么弱.把心沉下来,想想你到底想做什么! A 题意:O(-1) 思路:O(-1) #include <iostream> #in ...
- Codeforces Round #192 (Div. 2) B. Road Construction
#include <iostream> #include <vector> using namespace std; int main(){ int n,m; cin > ...
随机推荐
- C#父类子类对象关系
案例: 主要有Vehicle.cs Airplane.cs Car.cs 3个类. Car和Airplane都继承与Vehicle类.Vehicle中Drive为虚方法,可在子类中重写,父类引 ...
- Tomcat打包时多项目共享jar和精确指定jar版本
在产品打包发布时一个tomcat中如果存在多个war,部署的一般方式是部署到%TOMCAT_HOME%/webapps目录下,目录结构遵循J2EE规范,把引用的jar放到%TOMCAT_HOME%/w ...
- 03-VTK基础概念(2)
3.3 光照 剧场里有各式各样的灯光,三维渲染场景中也一样,可以有多个光照存在.光照和相机是三维渲染场景必备的因素,如果没有指定(像3.1.1_RenderCylinder例子,我们没有给Render ...
- Linux tar命令exclude选项排除指定文件或目录
在linux中可以用tar打包目录以方便传输or备份,我们先来看一个例子 test 文件夹有如下文件 [root@lee ~]# ll test 总用量 -rw-r--r--. root root 4 ...
- 查看现有运行的linux服务器有多少内存条
i161 admin # ssh 192.168.5.209 dmidecode | grep 'Ending Address' -B1 -A2 Starting Address: 0x0000 ...
- 面向侧面的程序设计AOP-------《一》概述
Aspect-Oriented Programming(面向方面编程,AOP)正好可以解决这一问题.它允许开发者动态地修改静态的OO模型,构造出一个能够不断增长以满足新增需求的系统,就象现实世界中的对 ...
- 2.11 2D平面最近点对问题[closest pair problem]
[本文链接] http://www.cnblogs.com/hellogiser/p/closest-pair-problem.html [题目] 给定平面上N个点的坐标,找出距离最近的两个点之间的距 ...
- 2.2 编程之美--不要被阶乘吓到[zero count of N factorial]
[本文链接] http://www.cnblogs.com/hellogiser/p/zero-count-of-N-factorial.html [题目] 问题1:给定一个整数N,那么N的阶乘N! ...
- 【python】2048
来源:https://www.shiyanlou.com/courses/368 实验楼的2048程序,在linux下可实现通过终端游戏. 主要学习的知识点: 1.状态机函数实现,用字典将状态和函数相 ...
- 部署django应用
Autor: wangxianlong 2016/7/10 16:17:55 环境: centos 6.5 python 2.7.5 django 1.9 nginx 1.8 selinux diab ...