dfs
文章平均质量分 77
Destinymiao
这个作者很懒,什么都没留下…
展开
-
ZOJ 4045 District Division【dfs找子节点】
District Division Time Limit: 1 Second Memory Limit: 65536 KB Special Judge Ezio learned a lot from his uncle Mario in Villa Auditore. He also made some contribution to Villa A...原创 2018-08-08 10:50:29 · 210 阅读 · 0 评论 -
hdu6446 Tree and Permutation【推公式+dfs】
Problem DescriptionThere are N vertices connected by N−1 edges, each edge has its own length.The set { 1,2,3,…,N } contains a total of N! unique permutations, let’s say the i -th permutation is Pi ...原创 2018-08-26 19:43:17 · 402 阅读 · 0 评论 -
洛谷P1019 单词接龙【dfs 回溯】
题目描述单词接龙是一个与我们经常玩的成语接龙相类似的游戏,现在我们已知一组单词,且给定一个开头的字母,要求出以这个字母开头的最长的“龙”(每个单词都最多在“龙”中出现两次),在两个单词相连时,其重合部分合为一部分,例如 beastbeast 和 astonishastonish ,如果接成一条龙则变为 beastonishbeastonish ,另外相邻的两部分不能存在包含关系,例如 atat...原创 2018-08-21 10:32:03 · 261 阅读 · 0 评论