
浙大PAT-Advanced
文章平均质量分 57
https://github.com/Eric-Ma-C/PAT-Advanced 浙江大学PAT甲级题库,使用C/C++,STL标准模板库解答
EricMac
这个作者很懒,什么都没留下…
展开
-
PAT-1022 Digital Library
1022 Digital Library (30)(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 as...原创 2018-08-14 12:19:14 · 157 阅读 · 0 评论 -
PAT-1023 Have Fun with Numbers
1023 Have Fun with Numbers (20)(20 分)Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which h...原创 2018-08-14 15:14:55 · 121 阅读 · 0 评论 -
PAT-1024 Palindromic Number
1024 Palindromic Number (25)(25 分)A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single d...原创 2018-08-14 17:59:45 · 132 阅读 · 0 评论 -
PAT-1025 PAT Ranking
1025 PAT Ranking (25)(25 分)Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in severa...原创 2018-08-14 20:26:22 · 88 阅读 · 0 评论 -
PAT-1097 Deduplication on a Linked List
1097 Deduplication on a Linked List (25)(25 分)Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each valu...原创 2018-08-14 21:32:08 · 133 阅读 · 0 评论 -
PAT-1016 Phone Bills
gfd1016 Phone Bills (25)(25 分)A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of...原创 2018-08-12 17:28:55 · 145 阅读 · 0 评论 -
PAT-1017 Queueing at Bank
1017 Queueing at Bank (25)(25 分)Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to...原创 2018-08-13 16:49:17 · 128 阅读 · 0 评论 -
PAT-1019 General Palindromic Number
1019 General Palindromic Number (20)(20 分)A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All ...原创 2018-08-13 17:32:21 · 124 阅读 · 0 评论 -
PAT-1020 Tree Traversals
1020 Tree Traversals (25)(25 分)Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level or...原创 2018-08-13 18:27:56 · 132 阅读 · 0 评论 -
PAT-1021 Deepest Root
1021 Deepest Root (25)(25 分)A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results i...原创 2018-08-13 21:18:19 · 156 阅读 · 0 评论 -
PAT-1095 Cars on Campus
1095 Cars on Campus (30)(30 分)Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the gate. Now with a...原创 2018-08-18 14:19:30 · 105 阅读 · 0 评论 -
PAT-1098 Insertion or Heap Sort
1098 Insertion or Heap Sort (25)(25 分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. At each iteration, insertion...原创 2018-08-18 17:00:34 · 175 阅读 · 0 评论 -
PAT-1099 Build A Binary Search Tree
1099 Build A Binary Search Tree (30)(30 分)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes wi...原创 2018-08-18 17:35:26 · 164 阅读 · 0 评论 -
PAT-1076 Forwards on Weibo
1076 Forwards on Weibo (30)(30 分)Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is forme...原创 2018-08-18 19:10:25 · 115 阅读 · 0 评论 -
PAT-1078 Hashing
1078 Hashing (25)(25 分)The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. The hash function is defi...原创 2018-08-18 21:18:22 · 207 阅读 · 0 评论 -
PAT-1018 Public Bike Management
1018 Public Bike Management (30)(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 ...原创 2018-08-16 17:53:27 · 179 阅读 · 0 评论 -
PAT-1079 Total Sales of Supply Chain
1079 Total Sales of Supply Chain (25)(25 分)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.St...原创 2018-08-19 10:54:14 · 304 阅读 · 0 评论 -
PAT-1068 Find More Coins
1068 Find More Coins(30 分)Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of...原创 2018-08-22 10:43:36 · 148 阅读 · 0 评论 -
PAT-1087 All Roads Lead to Rome
1087 All Roads Lead to Rome (30)(30 分)Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the m...原创 2018-08-16 22:06:44 · 221 阅读 · 0 评论 -
PAT-1071 Speech Patterns
1071 Speech Patterns(25 分)People often have a preference among synonyms of the same word. For example, some may prefer "the police", while others may prefer "the cops". Analyzing such patterns can h...原创 2018-08-22 11:28:14 · 119 阅读 · 0 评论 -
PAT-1038 Recover the Smallest Number
1038 Recover the Smallest Number(30 分)Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, we can recover...原创 2018-08-26 11:59:41 · 174 阅读 · 0 评论 -
PAT-1061 Dating
1061 Dating(20 分)Sherlock Holmes received a note with some strange strings: Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minute to figure out that th...原创 2018-08-26 13:56:54 · 207 阅读 · 0 评论 -
PAT-1080 Graduate Admission
1080 Graduate Admission (30)(30 分)It is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if you could writ...原创 2018-08-19 15:15:20 · 207 阅读 · 0 评论 -
PAT-1040 Longest Symmetric String
1040 Longest Symmetric String(25 分)Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given Is PAT&TAP symmetric?, the longest symmetric sub-...原创 2018-08-26 15:04:13 · 129 阅读 · 0 评论 -
PAT-1062 Talent and Virtue
1062 Talent and Virtue(25 分)About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his theory, a man being outst...原创 2018-08-26 15:33:22 · 214 阅读 · 0 评论 -
PAT-1070 Mooncake
1070 Mooncake(25 分)Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional mooncakes according to the r...原创 2018-08-26 16:04:37 · 290 阅读 · 0 评论 -
PAT-1072 Gas Station
1072 Gas Station(30 分)A gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as far away as possible. However it must...原创 2018-08-22 14:45:14 · 250 阅读 · 0 评论 -
PAT-1056 Mice and Rice
1056 Mice and Rice (25)(25 分)Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given map. The goal of ea...原创 2018-08-19 21:00:48 · 174 阅读 · 0 评论 -
PAT-1069 The Black Hole of Numbers
1069 The Black Hole of Numbers(20 分)For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decreasing order,...原创 2018-08-26 18:02:30 · 223 阅读 · 0 评论 -
PAT-1073 Scientific Notation
1073 Scientific Notation(20 分)Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]+E[+-]...原创 2018-08-26 20:40:39 · 90 阅读 · 0 评论 -
PAT-1075 PAT Judge
1075 PAT Judge(25 分)The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you are supposed to generate the ranklist for PAT.Input Specificatio...原创 2018-08-22 18:08:59 · 245 阅读 · 0 评论 -
PAT-1041 Be Unique
1041 Be Unique (20)(20 分)Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1, 10^4^...原创 2018-08-22 19:35:44 · 115 阅读 · 0 评论 -
PAT-1042 Shuffling Machine
1042 Shuffling Machine (20)(20 分)Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "inside jobs" where...原创 2018-08-22 19:58:22 · 120 阅读 · 0 评论 -
PAT-1043 Is It a Binary Search Tree
1043 Is It a Binary Search Tree (25)(25 分)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with ...原创 2018-08-22 21:12:58 · 110 阅读 · 0 评论 -
PAT-1090 Highest Price in Supply Chain
1090 Highest Price in Supply Chain (25)(25 分)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer...原创 2018-08-17 11:38:37 · 121 阅读 · 0 评论 -
PAT-1084 Broken Keyboard
1084 Broken Keyboard(20 分)On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.Now given a str...原创 2018-08-27 10:30:08 · 126 阅读 · 0 评论 -
PAT-1074 Reversing Linked List
1074 Reversing Linked List(25 分)Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, if K=3, then yo...原创 2018-08-27 11:24:07 · 116 阅读 · 0 评论 -
PAT-1088 Rational Arithmetic
1088 Rational Arithmetic(20 分)For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.Input Specification:Eac...原创 2018-08-27 14:28:40 · 138 阅读 · 0 评论 -
PAT-1091 Acute Stroke
1091 Acute Stroke (30)(30 分)One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions are identified in ea...原创 2018-08-17 17:50:43 · 239 阅读 · 0 评论 -
PAT-1044 Shopping in Mars
1044 Shopping in Mars (25)(25 分)Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M\$). When making the payment, th...原创 2018-08-23 10:26:02 · 102 阅读 · 0 评论