PAT
xiaoyisha
这个作者很懒,什么都没留下…
展开
-
【Dijkstra】PAT 1003. 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 by some roads. Amount of rescue teams in each city and the l...原创 2019-04-19 16:20:26 · 90 阅读 · 0 评论 -
【BFS 树的层序遍历】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...原创 2019-04-19 17:00:28 · 261 阅读 · 0 评论 -
【动态规划or双指针】PAT 1007 Maximum Subsequence Sum
Given a sequence ofKintegers {N1,N2, ...,NK}. A continuous subsequence is defined to be {Ni,Ni+1, ...,Nj} where1≤i≤j≤K. The Maximum Subsequence is the continuous subsequen...原创 2019-04-19 19:51:26 · 147 阅读 · 0 评论 -
【二分法】PAT 1010 Radix
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer isyes, if 6 is a decimal number and 110 is a binary number. Now for any pair of positive i...原创 2019-04-20 15:56:03 · 101 阅读 · 0 评论