文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > ACM竞赛试题(英文)
侵权投诉

ACM竞赛试题(英文)

nergy pool, Micheal#1 can use it to charge his battery ONLY ONCE. After the charging, Micheal#1’s battery will become FULL and the energy pool will become an empty area. Of course, passing an energy pool without using it is allowed.
4) Laser sensor, represented by a capital letter ‘D’. Since it is extremely sensitive, Micheal#1 cannot step into a grid with a laser sensor.
5) Power switch, represented by a capital letter ‘Y’. Once Micheal#1 steps into a grid with a Power switch, he will certainly turn it off.

In order to escape from the jail, Micheal#1 need to turn off all the power switches to stop the electric web on the roof—then he can just fly away. Moving to an adjacent grid (directly up, down, left or right) will cost 1 unit of energy and only moving operation costs energy. Of course, Micheal#1 cannot move when his battery contains no energy.

The larger the battery is, the more energy it can save. But larger battery means more weight and higher probability of being found by the weight sensor. So Micheal#1 needs to make his battery as small as possible, and still large enough to hold all energy he need. Assuming that the size of the battery equals to maximum units of energy that can be saved in the battery, and Micheal#1 is fully charged at the beginning, Please tell him the minimum size of the battery needed for his Prison break.
Input
Input contains multiple test cases, ended by 0 0. For each test case, the first line contains two integer numbers n and m showing the size of the jail. Next n lines consist of m capital letters each, which stands for the description of the jail.

You can assume that 1<=n,m<=15, and the sum of energy pools and power switches is less than 15.
Output
For each test case, output one integer in a line, representing the minimum size of the battery Micheal#1 needs. If Micheal#1 can’t escape, output -1.
Sample Input
5 5
GDDSS
SSSFS
SYGYS
SGSYS
SSYSS
0 0
Sample Output
4


Problem C. To Be an Dream Architect
Description
The “dream architect” is the key role in a team of “dream extractors” who enter other’s dreams to steal secrets. A dream architect is responsible for crafting the virtual world that the team and the target will dream into. To avoid the target noticing the world is artificial, a dream architect must have powerful 3D imagination.

Cobb uses a simple 3D imagination game to test whether a candidate has the potential to be an dream architect. He lets the candidate imagine a cube consisting of n×n×n blocks in a 3D coordinate system as Figure 1. The block at bottom left front corner is marked (1, 1, 1) and the diagonally opposite block is marked (n, n, n). Then he tells the candidate that the blocks on a certain line are eliminated. The line is always parallel to an axis. After m such block eliminations, the candidate is asked to tell how many blocks are eliminated. Note that one block can only be eliminated once even if it is on multiple lines.

He

上一页第2页

热门文档

相关文档

  • ACM英文试题

    ACM英文试题_工学_高等教育_教育专区。ACM International Collegiate Programming Contest Problem One: Jogging Trails Gord is training for aACM International ...

  • 2009年acm竞赛试题[1]

    2009年acm竞赛试题[1]_IT/计算机_专业资料。竞赛题基隆商工校内 ACM_第 25 ...每个样本是由 1 个英文字再加上 9 个数字所组成的字符 串。 【输出文件格式...

  • ACM竞赛练习题

    百度文库 教育专区 外语学习 英语考试专题推荐 北师大二附理科学霸高中... 东北... ACM竞赛之输入输出 3页 1下载券 ACM竞赛试题集锦 3页 免费 ACM竞赛讲座之一...

  • ACM竞赛试题集锦

    ACM竞赛试题集锦_IT/计算机_专业资料。ACM竞赛试题集锦取石子游戏 Time Limit:1S Memory Limit:1000K Total Submit:505 Accepted:90 Description 有两堆石子,数量...

  • 第三届ACM竞赛试题

    2010 年 5 月 16 日 所有的题目 时间限制: 1 秒 【试题一】 房间安排 ... 第三届河南省acm竞赛(正... 10页 免费 ACM竞赛试题(英文) 6页 免费 第...

  • ACM程序大赛选拔初赛试题 - 参考答案

    ACM程序大赛选拔初赛试题 - 参考答案_其它考试_资格考试/认证_教育专区。很好...1、字母排序 难度系数:★☆☆☆ 题意:有 10 个英文字母(包含大小写),用计算机...

  • 2009年acm竞赛试题

    2009年acm竞赛试题_IT/计算机_专业资料。2009年acm竞赛试题,可以通过这些题的...应该很多人都知道,我们的身份证是由 1 个英文字,再加上 9 个数字所组成....

  • 杭电acm题目水题英文题目、翻译及ac源代码

    杭电acm题目水题英文题目、翻译及ac源代码_计算机软件及应用_IT/计算机_专业资料。如题。供无网人士享用。今日推荐 157份文档 2015国家公务员考试备战攻略...

  • ACM试题解析-1

    此题虽为 ACM 比赛用题,却非常简单,没有什么特别之处,不牵扯数据结构, 实为初学者建立自信心的灵丹妙药。 英文原文 P1 - ACM SPPC 1 of 2 Saturday, 20/...

  • ACM竞赛讲座

    ACM竞赛讲座_IT/计算机_专业资料。ACM讲座? ACM大学生程序设计 竞赛浅谈 ACM/...竞赛 时,每队三人仅拥有一台计算机,在五个小时内,解答5~10道题目(题目是英文...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email