DFS
隨兴
在校研究生,努力奋斗中
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
PAT——1053 Path of Equal Weight(30分)(DFS遍历树)
1053 Path of Equal Weight (30 分) Given a non-empty tree with root R, and with weight Wi assigned to each tree node Ti. The weight of a path from R to L is defined to be the sum of the weights of all t...原创 2019-08-31 20:46:02 · 213 阅读 · 0 评论 -
PAT——1079 Total Sales of Supply Chain (25 分)
1079 Total 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. Starting...原创 2019-08-31 20:46:56 · 182 阅读 · 0 评论 -
PAT——1103 Integer Factorization (30 分)
1103 Integer Factorization (30 分) The K−P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program to find the K−P f...原创 2019-08-31 20:47:32 · 253 阅读 · 0 评论 -
PAT——1130
1130 Infix Expression (25 分) Given a syntax tree (binary), you are supposed to output the corresponding infix expression, with parentheses reflecting the precedences of the operators. Input Specificat...原创 2019-08-31 20:54:01 · 283 阅读 · 0 评论
分享