Home Problems Status Contest Register Login

B题要套一个数论的模版,注意m=1!! C题可以二分匹配,把行列看作点; 不能开百度,开谷歌搜题解,再次强调!一经发现,取消成绩!

ECJTU_ACM 11级队员2012年暑假训练赛(8)
4:30:00
  • Overview
  • Problem
  • Status
  • Rank
  • Discuss
A B C D E F G H I J K
F - A Mame

Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u

Submit Status Practice HDU 1010

Description

The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized that the bone was a trap, and he tried desperately to get out of this maze.

The maze was a rectangle with sizes N by M. There was a door in the maze. At the beginning, the door was closed and it would open at the T-th second for a short period of time (less than 1 second). Therefore the doggie had to arrive at the door on exactly the T-th second. In every second, he could move one block to one of the upper, lower, left and right neighboring blocks. Once he entered a block, the ground of this block would start to sink and disappear in the next second. He could not stay at one block for more than one second, nor could he move into a visited block. Can the poor doggie survive? Please help him.

Input

The input consists of multiple test cases. The first line of each test case contains three integers N, M, and T (1 < N, M < 7; 0 < T < 50), which denote the sizes of the maze and the time at which the door will open, respectively. The next N lines give the maze layout, with each line containing M characters. A character is one of the following:

'X': a block of wall, which the doggie cannot enter; 
'S': the start point of the doggie; 
'D': the Door; or
'.': an empty block.

The input is terminated with three 0's. This test case is not to be processed.

Output

For each test case, print in one line "YES" if the doggie can survive, or "NO" otherwise.

Sample Input

4 4 5 S.X. ..X. ..XD .... 3 4 5 S.X. ..X. ...D 0 0 0

Sample Output

NO YES


FAQ | About Virtual Judge | Forum | Discuss | Open Source Project
All Copyright Reserved ©2010-2012 HUST ACM/ICPC TEAM 
Anything about the OJ, please ask in the forum, or contact author:Isun
Server Time: 

转载于:https://www.cnblogs.com/ismdeep/archive/2012/08/13/2635980.html

【ECJTU_ACM 11级队员2012年暑假训练赛(8) - F - A Mame】相关推荐

  1. 长沙学院2022暑假训练赛(一)六级阅读

    D-六级阅读_长沙学院2022暑假训练赛(一) (nowcoder.com)https://ac.nowcoder.com/acm/contest/38762/D链接:登录-专业IT笔试面试备考平台_ ...

  2. 比赛-暑假训练赛1 (26 Jul, 2018)

    A. 密码 没有想到题解里机智的 P2-P1 避免重复计算,我以为是一个类似最长公共子串的 DP,OrzOrzOrz. 设输入分别为 A, B 两个字符串.f[i][j] 表示 A 串前 i 位与 B ...

  3. zcmu 暑假训练赛6 ABH题解

    Problem A: 超大型 LED 显示屏 Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 72  Solved: 41 [Submit][Statu ...

  4. “科林明伦杯”哈尔滨理工大学暑假训练赛 B吃雪糕 (异或思维题)(补题)

    B吃雪糕 点击跳转 题 题目描述 桃也野正在吃很大一块雪糕,雪糕从左到右分成了n个区域,每个区域都有自己的口味,每种口味可以用一个数ai来描述.桃也野不喜欢吃口味相似的雪糕,如果ai⊕aj<2^ ...

  5. 中医药暑假训练赛三 c题 题解 (多重背包问题)

    原题: Description 主角kirito是使用世界首款完全潜行游戏"刀剑神域(Sword Art Online)"的玩家.曾经很幸运的参与过封闭测试,并买下正式版的kiri ...

  6. 《预训练周刊》第25期:HyperCLOVA:数十亿级韩语生成式预训练变换器、GPT-3在生物医学领域不是好的小样本学习器...

    No.25 智源社区 预训练组 预 训 练 研究 观点 资源 活动 关于周刊 超大规模预训练模型是当前人工智能领域研究的热点,为了帮助研究与工程人员了解这一领域的进展和资讯,智源社区整理了第25期&l ...

  7. 《纽约客》特写Jeff Dean与Sanjay:谷歌唯二11级工程师,同一台电脑上写代码

    作者:<纽约客> James Somers 翻译:新浪科技 堆堆.李明 量子位 经授权转载 | 公众号 QbitAI 最近,<纽约客>杂志写了一篇长文,描述谷歌唯二11级工程师 ...

  8. 19级算法训练赛第七场

    19级算法训练赛第七场 传送门:https://vjudge.net/contest/362412#problem/J A - 程序设计:合并数字 蒜头君得到了 n 个数,他想对这些数进行下面这样的操 ...

  9. 2012年扑克牌训练日记之一

    2012年扑克牌训练日记之一 概述 训练时间:1个星期 时间是:2012年5月8日 成绩是:24分钟 方法 桩子:26个桩子 分别是: 桩子序号 桩子名称 1 头发 2 眼睛 3 鼻子 4 嘴巴 5 ...

最新文章

  1. C++关键字static
  2. 清明出游,你会“鸽”酒店吗?AI 早已看穿一切
  3. 根据时间点截取wav文件
  4. 技术安全与伦理的较量:论道AI的能与不能 | AI Time
  5. dblink 造成 oracle 服务器 内存_性能故障之内存抖动的诊断过程
  6. c# 从一个大图里截取图形
  7. java网络接口_java网络编程之识别示例 获取主机网络接口列表
  8. SpringBoot实战(八):集成Swagger
  9. mysql批量插入跟更新_Mysql批量插入和更新的性能-问答-阿里云开发者社区-阿里云...
  10. Python 函数也是一种对象
  11. 怎样在微信、手机中浏览查看3D模型
  12. 服务器机房消防系统,服务器机房消防系统和维护
  13. 专业测评:iphone7致命缺陷曝光
  14. 【重要】一部手机失窃而揭露的黑色产业链—完整修订版
  15. FBI也需要云计算吗?
  16. 多线程处理十万百万级List(大list处理)
  17. android gta5 下载地址,GTA 5 for Android下载
  18. c语言 conio h,c语言中conio.h是什么?
  19. 福州市计算机等级考试培训点,计算机等级考试培训
  20. 【案例练习】12—50 个从今天就可以开始做起来的小型Web项目

热门文章

  1. Node.js 修复4个漏洞
  2. 全球约30%的智能手机受高通新漏洞影响,打补丁状况不明
  3. Mac 安装php redis扩展
  4. 【完全开源】百度地图Web service API C#.NET版,带地图显示控件、导航控件、POI查找控件...
  5. 初始----python数字图像处理--:环境安装与配置
  6. IDEA 忽略CSS错误
  7. 使用js获取select选中文本
  8. 图文解说:Discuz论坛基础设置第一弹
  9. 【掩耳盗铃】[转载]北京铁路局:“北京站37号窗口售票员内部大量出票”是为分区售票...
  10. 【Vegas原创】ProC环境搭建