PAT Advanced Level
文章平均质量分 82
AlfieDiCaprio
这个作者很懒,什么都没留下…
展开
-
[PAT] A1143/A1151 Lowest Common Ancestor
A1143/A1151 Lowest Common Ancestor1143 Lowest Common Ancestor1151 LCA in a Binary Tree 1143 Lowest Common Ancestor Link 1143 Lowest Common Ancestor (30 分) The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U a原创 2021-08-16 17:13:04 · 203 阅读 · 0 评论 -
[PAT] A1153 Decode Registration Card of PAT
A1153 Decode Registration Card of PATLinkInput SpecificationOutput SpecificationSample Input & OutputSample InputSample OutputTopicAnalysis & Code Link 1153 Decode Registration Card of PAT (25 分) A registration card number of PAT consists of 4 part原创 2021-08-05 02:09:32 · 258 阅读 · 0 评论 -
[PAT] A1152 Google Recruitment
A1152 Google RecruitmentLinkInput SpecificationOutput SpecificationSample Input & OutputSample Input 1Sample Output 1Sample Input 2Sample Output 2TopicAnalysis & Code Link 1152 Google Recruitment (20 分) In July 2004, Google posted on a giant billbo原创 2021-08-05 01:53:24 · 121 阅读 · 0 评论 -
[PAT] A1016 Phone Bills
A1016 Phone BillsLinkInput SpecificationOutput SpecificationSample InputSample OutputCode Link 1016 Phone Bills (25 分) A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain amount per mi原创 2021-07-30 00:46:49 · 77 阅读 · 0 评论 -
[PAT] A1015 Reversible Primes
A1015 Reversible PrimesInput SpecificationOutput SpecificationSample InputSample OutputCode A reversible prime in any number system is a prime whose “reverse” in that number system is also a prime. For example in the decimal system 73 is a reversible prime原创 2021-07-28 23:15:39 · 103 阅读 · 0 评论 -
[PAT] A1012 The Best Rank
A1012 The Best RankInput SpecificationOutput SpecificationSample InputSample OutputCode To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus原创 2021-07-26 23:45:21 · 96 阅读 · 0 评论 -
[PAT] A1011 World Cup Betting
A1008 ElevatorInput SpecificationOutput SpecificationSample InputSample OutputCode With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup原创 2021-07-23 11:55:24 · 81 阅读 · 0 评论 -
[PAT] A1009 Product of Polynomials
A1009 Product of PolynomialsInput SpecificationOutput SpecificationSample InputSample OutputCode 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 lin原创 2021-07-23 11:48:02 · 84 阅读 · 0 评论 -
[PAT] A1008 Elevator
A1008 ElevatorInput SpecificationOutput SpecificationSample InputSample OutputCode 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 spec原创 2021-07-22 23:12:40 · 117 阅读 · 1 评论 -
[PAT] A1006 Sign In and Sign Out
A1006 Sign In and Sign OutInput SpecificationOutput SpecificationSample InputSample OutputCode 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原创 2021-07-22 21:51:01 · 77 阅读 · 0 评论 -
[PAT] A1005 Spell It Right
A1005 Spell It RightInput SpecificationOutput SpecificationSample InputSample OutputCode 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 fi原创 2021-07-22 21:43:31 · 86 阅读 · 1 评论 -
[PAT] A1003 Emergency
A1003 EmergencyInput SpecificationOutput SpecificationSample InputSample OutputCode 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原创 2021-07-22 21:40:55 · 102 阅读 · 0 评论 -
[PAT] A1002 A+B for Polynomials (23分!)
A1002 A+B for PolynomialsInput SpecificationOutput SpecificationSample InputSample OutputCode 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,原创 2021-07-21 19:11:39 · 130 阅读 · 0 评论 -
[PAT] A1001 A+B Format
A1001 A+B FormatInput SpecificationOutput SpecificationSample InputSample OutputCode Calculate a+b and output the sum in standard format – that is, the digits must be separated into groups of three by commas (unless there are less than four digits). Input原创 2021-07-21 18:57:01 · 83 阅读 · 0 评论 -
[PAT] A1036 Boys vs Girls(查找问题)
1036 Boys vs GirlsInput SpecificationOutput SpecificationSample Input 1Sample Output 1Sample Input 2Sample Output 2AnalysisCode This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all th原创 2021-01-24 22:53:31 · 112 阅读 · 0 评论 -
[PAT] A1011 World Cup Betting(数学问题)
1011 World Cup BettingInput Specification:Output Specification:Sample Input:Sample Output:Analysis:Code: With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing bat原创 2021-01-24 16:50:49 · 111 阅读 · 0 评论