PAT
文章平均质量分 77
RT
才疏学浅易大师
追求代码之美
展开
-
Advanced Level-PAT甲级 1007 Maximum Subsequence Sum
Given a sequence of K integers { N 1, N 2, …, N K}. A continuous subsequence is defined to be { N i, N i+1, …, N j} where 1≤i≤j≤K. The Maximum Subsequence is the continuous subsequence which has the largest sum of its elements. For example, given sequence原创 2022-06-29 11:19:28 · 194 阅读 · 0 评论 -
Advanced Level-PAT甲级 1004 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 Specification: Each input file contains one test case. Each case starts with a line containing 0<N<100, the number of nodes原创 2022-04-25 22:42:20 · 456 阅读 · 0 评论