
搜索(DFS)
文章平均质量分 79
sdau164185
这个作者很懒,什么都没留下…
展开
-
暑假练习--hdoj--搜索--suduku
这个题必须要写一篇博客了……这个题算是做过的最久的一道题吧。想了很长时间,一直没想好怎么做。要保证每一行每一列还有没个格子都不重复,行和列还好说,每个格子不一样不知道怎么做。搜索的话,开始是想几个方向一起搜,但是想想不行,又想一行一列一起搜,想想也不行。想了好久都不知道怎么搜。实在想不出来了,最后了解了一下别人的思路,一行一行的搜……感觉也考虑过……但是就这个没写过了。下面是原题:(感觉这个代原创 2017-08-02 17:52:26 · 278 阅读 · 0 评论 -
8.17--练习赛E题--Scales(DFS背包加剪枝)
Farmer John has a balance for weighing the cows. He also has a set of N (1 <= N <= 1000) weights with known masses (all of which fit in 31 bits) for use on one side of the balance. He places a cow on原创 2017-08-17 22:06:47 · 301 阅读 · 0 评论