
深搜dfs
sysu_zjl
这个作者很懒,什么都没留下…
展开
-
sicily1142(深搜加剪枝)
数据结构期末考试最后一道题,到现在才写出来哈。。 还是因为看了《编程之美》这本书一摞烙饼的排序问题之后才写的。 看完编程之美,才发现这道题原来这么坑。没有在多项式复杂度的解法。 然后我首先用编程之美类似的方法,导致time limit 《编程之美》书中的方法是先给定的upperbound为2*countn-1 当dfs之后有比upperbound小的再动态修改upperbound, 这样原创 2016-04-15 23:12:14 · 836 阅读 · 0 评论 -
codefoces_#346E - New Reform(并查集或dfs)
E. New Reform time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Berland has n cities connected by m bidirectional roads. No road connects a c原创 2016-04-12 17:15:04 · 659 阅读 · 2 评论