随笔分类 - DFS(深度优先搜索)
摘要:完美正方形 如果一些边长互不相同的正方形,可以恰好拼出一个更大的正方形,则称其为完美正方形。历史上,人们花了很久才找到了若干完美正方形。比如:如下边长的22个正方形 2 3 4 6 7 8 12 13 14 15 16 17 18 21 22 23 24 26 27 28 50 60 如【图1.pn
阅读全文
摘要:Counting Leaves A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specifi
阅读全文
摘要:Emergency As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected
阅读全文
摘要:Deepest Root A graph which is connected and acyclic can be considered a tree. The hight of the tree depends on the selected root. Now you are supposed
阅读全文
摘要:Public Bike Management There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One m
阅读全文

浙公网安备 33010602011771号