当前位置: 首页 > news >正文

Codeforces Round #363 (Div. 2)[B]One Bomb

B. One Bomb
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You are given a description of a depot. It is a rectangular checkered field of n × m size. Each cell in a field can be empty (“.”) or it can be occupied by a wall (“*”).

You have one bomb. If you lay the bomb at the cell (x, y), then after triggering it will wipe out all walls in the row x and all walls in the column y.

You are to determine if it is possible to wipe out all walls in the depot by placing and triggering exactly one bomb. The bomb can be laid both in an empty cell or in a cell occupied by a wall.
Input

The first line contains two positive integers n and m (1 ≤ n, m ≤ 1000) — the number of rows and columns in the depot field.

The next n lines contain m symbols “.” and “” each — the description of the field. j-th symbol in i-th of them stands for

相关文章:

  • BFS、双向BFS和A*
  • 二分的模板(花式二分)
  • STL之set集合容器
  • NOIP2016#模拟考试 Day.1# T1 洗澡
  • NOIP2016#模拟考试 Day.1# T3 导航软件
  • [hdu 4405] Aeroplane chess [概率DP 期望]
  • NOIP2016#模拟考试 Day.2# T2 网络修复 【LCA + 并查集】
  • NOIP2016#模拟考试 Day.2# T3 王位继承
  • [hdu 2826] The troubles of lmy [简单计算几何 - 相似]
  • [hdu 2896] 病毒侵袭 [ac自动机][病毒特征码匹配]
  • [hdu 3065] 病毒侵袭持续中 [AC自动机] [病毒特征码匹配]
  • TCP/IP协议讲解 一
  • #NOIP 2014# day.1 生活大爆炸版 石头剪刀布
  • #NOIP 2014# day.1 T2 联合权值
  • #NOIP 2014# day.1 T3 飞扬的小鸟 bird
  • 【技术性】Search知识
  • 4. 路由到控制器 - Laravel从零开始教程
  • CSS居中完全指南——构建CSS居中决策树
  • extjs4学习之配置
  • GitUp, 你不可错过的秀外慧中的git工具
  • leetcode46 Permutation 排列组合
  • Python socket服务器端、客户端传送信息
  • vue-loader 源码解析系列之 selector
  • vue学习系列(二)vue-cli
  • 从输入URL到页面加载发生了什么
  • 记一次用 NodeJs 实现模拟登录的思路
  • 解析带emoji和链接的聊天系统消息
  • 每天一个设计模式之命令模式
  • 测评:对于写作的人来说,Markdown是你最好的朋友 ...
  • 进程与线程(三)——进程/线程间通信
  • 说说我为什么看好Spring Cloud Alibaba
  • ​ ​Redis(五)主从复制:主从模式介绍、配置、拓扑(一主一从结构、一主多从结构、树形主从结构)、原理(复制过程、​​​​​​​数据同步psync)、总结
  • ​iOS实时查看App运行日志
  • ![CDATA[ ]] 是什么东东
  • #使用清华镜像源 安装/更新 指定版本tensorflow
  • (12)目标检测_SSD基于pytorch搭建代码
  • (超简单)使用vuepress搭建自己的博客并部署到github pages上
  • (考研湖科大教书匠计算机网络)第一章概述-第五节1:计算机网络体系结构之分层思想和举例
  • (力扣)循环队列的实现与详解(C语言)
  • (牛客腾讯思维编程题)编码编码分组打印下标题目分析
  • (一)Mocha源码阅读: 项目结构及命令行启动
  • (转)Groupon前传:从10个月的失败作品修改,1个月找到成功
  • (自用)learnOpenGL学习总结-高级OpenGL-抗锯齿
  • .NET 程序如何获取图片的宽高(框架自带多种方法的不同性能)
  • .NET基础篇——反射的奥妙
  • [ 2222 ]http://e.eqxiu.com/s/wJMf15Ku
  • [ Linux 长征路第五篇 ] make/Makefile Linux项目自动化创建工具
  • [ vulhub漏洞复现篇 ] Celery <4.0 Redis未授权访问+Pickle反序列化利用
  • [ 网络基础篇 ] MAP 迈普交换机常用命令详解
  • [android] 看博客学习hashCode()和equals()
  • [G-CS-MR.PS02] 機巧之形2: Ruler Circle
  • [idea]关于idea开发乱码的配置
  • [Linux] 进程间通信基础
  • [Linux打怪升级之路]-信号的保存和递达
  • [mvc] 简单的forms认证