随笔 - 418  文章 - 0  评论 - 18  阅读 - 132万

随笔分类 -  第六届河南省程序设计大赛

ny712 探寻宝藏 ny61 传纸条(1)
摘要:探 寻 宝 藏时间限制:1000 ms | 内存限制:65535 KB难度:5描述传说HMH大沙漠中有一个M*N迷宫,里面藏有许多宝物。某天,Dr.Kong找到了迷宫的地图,他发现迷宫内处处有宝物,最珍贵的宝物就藏在右下角,迷宫的进出口在左上角。当然,迷宫中的通路不是平坦的,到处都是陷阱。Dr.Kong决定让他的机器人卡多去探险。但机器人卡多从左上角走到右下角时,只会向下走或者向右走。从右下角往回走到左上角时,只会向上走或者向左走,而且卡多不走回头路。(即:一个点最多经过一次)。当然卡多顺手也拿走沿路的每个宝物。Dr.Kong希望他的机器人卡多尽量多地带出宝物。请你编写程序,帮助Dr.Kong 阅读全文
posted @ 2014-03-20 19:16 细雨微光 阅读(748) 评论(0) 推荐(0) 编辑
nyoj 715 Adjacent Bit Counts
摘要:描述For a string of n bits x1, x2, x3, …, xn, the adjacent bit count of the string is given by fun(x) = x1*x2 + x2*x3 + x3*x 4 + … + xn-1*x nwhich counts the number of times a 1 bit is adjacent to another 1 bit. Forexample: Fun(011101101) = 3 Fun(111101101) = 4 Fun (010101010) = 0 Write a program w... 阅读全文
posted @ 2014-02-27 20:17 细雨微光 阅读(385) 评论(0) 推荐(0) 编辑
ny710 外星人的供给站
摘要:外星人的供给站时间限制:1000 ms | 内存限制:65535 KB难度:3描述外星人指的是地球以外的智慧生命。外星人长的是不是与地球上的人一样并不重要,但起码应该符合我们目前对生命基本形式的认识。比如,我们所知的任何生命都离不开液态水,并且都是基于化学元素碳(C)的有机分子组合成的复杂有机体。42岁的天文学家Dr. Kong已经执著地观测ZDM-777星球十多年了,这个被称为“战神”的红色星球让他如此着迷。在过去的十多年中,他经常有一些令人激动的发现。ZDM-777星球表面有着明显的明暗变化,对这些明暗区域,Dr. Kong已经细致地研究了很多年,并且绘制出了较为详尽的地图。他坚信那些暗区 阅读全文
posted @ 2014-02-12 15:48 细雨微光 阅读(457) 评论(0) 推荐(0) 编辑
ny714 Card Trick
摘要:Card Trick时间限制:1000 ms | 内存限制:65535 KB难度:3描述The magician shuffles a small pack of cards, holds it face down and performs the following procedure:The top card is moved to the bottom of the pack. The new top card is dealt face up onto the table. It is the Ace of Spades.Two cards are moved one at a tim 阅读全文
posted @ 2014-02-12 15:41 细雨微光 阅读(472) 评论(0) 推荐(0) 编辑
ny716 River Crossing
摘要:River Crossing时间限制:1000 ms | 内存限制:65535 KB难度:4描述Afandi is herding N sheep across the expanses of grassland when he finds himself blocked by a river. A single raft is available for transportation.Afandi knows that he must ride on the raft for all crossings, but adding sheep to the raft makes it trave 阅读全文
posted @ 2014-02-12 15:35 细雨微光 阅读(345) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示