随笔分类 - 图论_搜索专题
摘要:Problem Description: 扫雷这个游戏想必各位都是会玩的吧。简单说一下规则,n行m列的格子地图上有分布一些雷。起先每个格子 都是未点开的状态,我们依次点开格子,找出所有雷。有如下3条规则: 1.点开的地方如果相邻的格子(上、下、左、右,左上、左下、右上、右下)有雷,该格子显示一个数字
阅读全文
摘要:描述 给出三个水杯,大小不一,并且只有最大的水杯的水是装满的,其余两个为空杯子。三个水杯之间相互倒水,并且水杯没有标识,只能根据给出的水杯体积来计算。现在要求你写出一个程序,使其输出使初始状态到达目标状态的最少次数。 输入 第一行一个整数N(0<N<50)表示N组测试数据接下来每组测试数据有两行,第
阅读全文
摘要:Problem Description Claire and her little friend, ykwd, are travelling in Shevchenko's Park! The park is beautiful - but large, indeed. N feature spot
阅读全文
摘要:Description After hearing about the epidemic of obesity in the USA, Farmer John wants his cows to get more exercise, so he has committed to create a b
阅读全文
摘要:描述 上回说到,小Ho得到了一棵二叉树玩具,这个玩具是由小球和木棍连接起来的,而在拆拼它的过程中,小Ho发现他不仅仅可以拼凑成一棵二叉树!还可以拼凑成一棵多叉树——好吧,其实就是更为平常的树而已。 但是不管怎么说,小Ho喜爱的玩具又升级换代了,于是他更加爱不释手(其实说起来小球和木棍有什么好玩的是吧
阅读全文
摘要:Problem Description Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to
阅读全文
摘要:Problem Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N
阅读全文
摘要:Description Bessie hears that an extraordinary meteor shower is coming; reports say that these meteors will crash into earth and destroy anything they
阅读全文
摘要:Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,
阅读全文
摘要:Problem Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black til
阅读全文
摘要:Description Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0
阅读全文
摘要:Description Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 10
阅读全文
摘要:Problem Description A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are l
阅读全文
摘要:Jack拆炸弹 Jack拆炸弹 Time Limit: 2000/1000ms (Java/Others) Time Limit: 2000/1000ms (Java/Others) Problem Description: 在一个由n*n个格子组成的监狱里被恐怖份子安置了一个定时炸弹。其中,连续的
阅读全文
摘要:新七步诗 新七步诗 Time Limit: 2000/1000ms (Java/Others) Time Limit: 2000/1000ms (Java/Others) Problem Description: 突然的一天,小锴做了一个梦,梦见自己来到了三国,而自己也成了梦寐以求的帅哥——曹植。不
阅读全文
摘要:魔仙岛探险 魔仙岛探险 Time Limit: 2000/1000ms (Java/Others) Time Limit: 2000/1000ms (Java/Others) Problem Description: 小敏通过秘密方法得到一张不完整的魔仙岛航拍地图。魔仙岛由一个主岛和一些附属岛屿组成
阅读全文
摘要:Problem Description Op tech briefing, 2002/11/02 06:42 CST "The item is locked in a Klein safe behind a painting in the second-floor library. Klein sa
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1010 Problem Description The doggie found a bone in an ancient maze, which fascinated him a lot. Howeve
阅读全文
摘要:Problem Description: 如图所示,环由n个圆组成。 将自然数1,2,...,n分别放入每个圆中,并且两个相邻圆中的数字总和应为素数。 注意:第一个圆圈的数量应该始终为1。 Problem Description: 如图所示,环由n个圆组成。 将自然数1,2,...,n分别放入每个圆
阅读全文