![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT
liuxinghuiblog
这个作者很懒,什么都没留下…
展开
-
1009 Product of Polynomials (25 分)
1009 Product of Polynomials (25 分)This time, you are supposed to find A×B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines...转载 2019-02-21 18:58:23 · 528 阅读 · 0 评论 -
1155 Heap Paths (30 分)
1155 Heap Paths (30 分)In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either gre...原创 2019-02-26 16:43:21 · 140 阅读 · 0 评论 -
1030 Travel Plan (30 分)
题目:A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a program to help a traveler to decide the shortest pat...原创 2019-02-26 13:05:42 · 278 阅读 · 0 评论 -
PAT 甲级 1022 Digital Library (30 分)
1022 Digital Library (30 分)A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assign...原创 2019-02-25 16:12:46 · 161 阅读 · 0 评论 -
1018 Public Bike Management (30 分)
There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and return it to any other stations in the ...原创 2019-02-24 20:47:57 · 210 阅读 · 0 评论 -
PAT甲级 1007 Maximum Subsequence Sum (25 分)
1007 Maximum Subsequence Sum (25 分)Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1≤i≤j≤K. The Maximum Su...原创 2019-02-18 19:17:55 · 256 阅读 · 0 评论 -
PAT 甲级 1006 Sign In and Sign Out (25 分)
1006 Sign In and Sign Out (25 分)At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the reco...原创 2019-02-18 15:23:31 · 166 阅读 · 0 评论 -
1151 LCA in a Binary Tree (30 分)
1151LCA in a Binary Tree(30 分)The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants.Given any two nodes in a binary tree, you a...原创 2019-02-27 21:28:09 · 217 阅读 · 0 评论 -
PAT甲级 1005 Spell It Right (20 分)
1005 Spell It Right (20 分)Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each input file...原创 2019-02-18 13:33:07 · 224 阅读 · 0 评论 -
1014 Waiting in Line (30 分)
1014 Waiting in Line (30 分)Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to...原创 2019-02-23 14:48:32 · 209 阅读 · 0 评论 -
PAT甲级 1004 Counting Leaves (30 分)
1004 Counting Leaves (30 分)1004 数叶子 (30分)A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.家族层次结构通常由系谱树表示,你的任务是数出哪些家族成员没有...原创 2019-02-17 00:24:17 · 171 阅读 · 0 评论 -
1013 Battle Over Cities (25 分)
1013 Battle Over Cities (25 分)It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We...原创 2019-02-22 18:12:09 · 224 阅读 · 0 评论 -
PAT 甲级 1010 Radix (25 分)
1010 Radix (25 分)Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a binary number.Now for any pa...原创 2019-02-22 13:13:05 · 234 阅读 · 0 评论 -
PAT 1003 Emergency (25 分)
1003 Emergency (25 分)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...转载 2019-02-16 17:37:28 · 559 阅读 · 0 评论 -
PAT 甲级 1008 Elevator (20 分)
1008 Elevator (20 分)The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified...原创 2019-02-21 13:14:15 · 271 阅读 · 0 评论