深度/广度搜索
ZXX_1999
这个作者很懒,什么都没留下…
展开
-
1004 Counting Leaves (30 分) DFS+vector
1004Counting Leaves(30分) A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each input file contains on...原创 2019-11-15 20:40:15 · 601 阅读 · 0 评论 -
1106 Lowest Price in Supply Chain (25 分) 静态树vector+DFS
1106Lowest Price in Supply Chain(25分) A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer. Start...原创 2019-11-15 20:03:55 · 121 阅读 · 0 评论 -
1094 The Largest Generation (25 分) 静态的树的写法vector<int> Node[maxn]+DFS
1094The Largest Generation(25分) A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find the generation ...原创 2019-11-15 19:46:48 · 146 阅读 · 0 评论 -
1079 Total Sales of Supply Chain (25 分) 树的遍历:DFS+vector
1079Total Sales of Supply Chain(25分) A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer. Starti...原创 2019-11-15 19:19:33 · 155 阅读 · 0 评论 -
1090 Highest Price in Supply Chain (25 分) 树的遍历:深度搜索+vector
返回 1090Highest Price in Supply Chain(25分) A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer. ...原创 2019-11-15 18:29:51 · 139 阅读 · 0 评论 -
1053 Path of Equal Weight (30 分)一般树的遍历 DFS+vector容器+sort排序
1053Path of Equal Weight(30分) Given a non-empty tree with rootR, and with weightWiassigned to each tree nodeTi. Theweight of a path fromRtoLis defined to be the sum of the weights o...原创 2019-11-13 16:39:24 · 154 阅读 · 0 评论 -
1091 Acute Stroke (30 分)广度优先搜索,用queue,重写一遍
One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions are identified in each MRI slice, your job is t...原创 2019-11-11 17:49:25 · 108 阅读 · 0 评论 -
1103 Integer Factorization (30 分)深度搜索30分大题要重写
1103Integer Factorization(30分) 注意每个因子是可以重选的,所以在选择的情况下下一层仍然是index TheK−Pfactorization of a positive integerNis to writeNas the sum of theP-th power ofKpositive integers. You are supposed ...原创 2019-11-10 16:38:55 · 181 阅读 · 0 评论