dfs
zab123321v
这个作者很懒,什么都没留下…
展开
-
Dating with girls(2) HDU - 2579
**Dating with girls(2) HDU - 2579**If you have solved the problem Dating with girls(1).I think you can solve this problem too.This problem is also about dating with girls. Now you are in a maze and...原创 2019-04-08 00:02:16 · 270 阅读 · 0 评论 -
Sticks UVA - 307 剪枝 (超详细的题解)
Sticks UVA - 307题目链接题目大意:有等长木棒,将木棒随意砍成几段,直到每段木棍的长度都不超过50.现在将木棍拼接成原来的样子,但是不记得最开始有多少木棒和它们的分别长度。给出每根小木棍的长度,编程找出原始木棒的最小可能长度。ps:木棒和木棍是不一样的。思路:这道题非常经典,有多个剪枝,把剪枝用到了极致。第一个剪枝:我们首先要枚举原来木棒的长度,那么该从几开始,到几结束呢?范...原创 2019-07-21 19:24:03 · 329 阅读 · 0 评论 -
Channel Allocation POJ - 1129 详细题解
Channel Allocation POJ - 1129When a radio station is broadcasting over a very large area, repeaters are used to retransmit the signal so that every receiver has a strong signal. However, the channels...原创 2019-07-21 19:43:44 · 356 阅读 · 1 评论 -
Addition Chains ZOJ - 1937 详细的解释
Addition Chains ZOJ - 1937An addition chain for n is an integer sequence <a0, a1,a2,…,am> with the following four properties:a0 = 1am = na0 < a1 < a2 < … < am-1 < amFor each ...原创 2019-07-21 20:19:00 · 316 阅读 · 0 评论