广度优先搜索
__铭
这个作者很懒,什么都没留下…
展开
-
poj 1426 Find The Multiple
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 and 1. You may assume that n is not greater than原创 2015-08-18 19:39:26 · 468 阅读 · 0 评论 -
poj 3087 Shuffle'm Up(简单的广搜)
Description A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips, S1 and S2, each stack contai原创 2015-08-19 10:49:15 · 497 阅读 · 0 评论 -
poj 3414 Pots
题意:给出A, B, C分别代表第一个瓶子的容量,第二个瓶子的容量,以及目标水量,只要是经过以下六个步骤能够有一个瓶子能够达到目标水量,就完成目标,记录步骤; 1. 倒空第一个 2. 倒空第二个 3. 把第一个瓶子的水倒入第二个 4. 把第二个瓶子的水倒入第一个 5. 倒满第一个 6. 倒满第二个 ps : 上述六个步骤无先后顺序 Description You are原创 2015-08-19 16:03:47 · 391 阅读 · 0 评论 -
poj 2531 Network Saboteur(DFS减枝)
题意:将n个计算机分成两部分,求权值的最大值 方法:先默认将所有的放入一个集合,然后将里面的元素一个一个的转移到另一个集合 Description A university network is composed of N computers. System administrators gathered information on the traffic between nodes,原创 2015-08-20 10:51:16 · 406 阅读 · 0 评论