
广搜
文章平均质量分 88
饿狼干爹
理想是丰满的,现实是骨干的
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
倒油问题详解 (深搜、广搜)(面向过程和面向对象)
题目:有一位厨师要从盛12斤油(a桶)的桶中倒出6斤油来,可是手边只有盛8斤油(b桶)和盛5斤油(c桶)的两个桶,问如何操作才能将6斤取出来呢? 思路:思路其实很容易理解,就是三个桶之间互相倒油,直到倒出想要的结果,也就是其中任意一个桶中出现6即可。难就难在,如果直接让三个桶互相倒的话,很容易出现死循环,也就是a倒到b,下一步的时候,有让b倒回到a,所以要防止这种 情况的出现,才能找到结果。解原创 2015-08-03 15:25:29 · 5485 阅读 · 0 评论 -
hdu1242(Rescue)
点击打开链接 Problem Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M Angel's friends want to save Angel. Their task is: approac原创 2015-08-08 23:49:47 · 623 阅读 · 0 评论 -
hdu1195(Open the Lock)
点击打开链接 Problem Description Now an emergent task for you is to open a password lock. The password is consisted of four digits. Each digit is numbered from 1 to 9. Each time, you can add or minus原创 2015-08-08 01:50:29 · 652 阅读 · 0 评论 -
hdu1241(Oil Deposits)
Problem Description The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a原创 2015-08-04 21:15:08 · 861 阅读 · 0 评论 -
hdu1253(胜利大逃亡)
点击打开杭电1253 Problem Description Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会. 魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回到城堡,Ignatius每分钟能原创 2015-08-06 02:36:04 · 870 阅读 · 0 评论