![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pat
文章平均质量分 93
就当一次路过丶
末流本二 独自战斗
http://www.cloudmo.top
欢迎友链 欢迎来踩
展开
-
PAT-2019年秋季考试-甲级
去年第一次考PAT可能有点紧张,再加上上来一道狼人杀一直没看懂啥意思做了好久,最后一题有思路但是一直错误,最后只拿了54分,QAQ。去年是在苏州的一个考点,考点也有点小坑,好像没有VS的,我当时报的时候也没了解,考试就用的DevC++,不能Debug。。我有个同学去的徐州的考场好像也很LOW,今年去的南京的考场。VS2008 VS2010 VS2015全有(不过不知道为啥我看到同考场还有人...原创 2019-09-09 15:31:28 · 1646 阅读 · 3 评论 -
PAT(甲级)2018年秋季考试 7-3 Travelling Salesman Problem (25 分)
7-3 Travelling Salesman Problem (25 分)The “travelling salesman problem” asks the following question: “Given a list of cities and the distances between each pair of cities, what is the shortest possib...原创 2019-09-07 12:02:08 · 267 阅读 · 0 评论 -
PAT(甲级)2018年秋季考试 7-1 Werewolf - Simple Version (20 分)
7-1 Werewolf - Simple Version (20 分)Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game,player #1 said: “Playe...原创 2019-09-07 12:02:42 · 1703 阅读 · 2 评论 -
PAT(甲级)2018年秋季考试 7-2 Dangerous Goods Packaging (25 分)
7-2 Dangerous Goods Packaging (25 分)When shipping goods with containers, we have to be careful not to pack some incompatible goods into the same container, or we might get ourselves in serious troubl...原创 2019-09-07 12:02:59 · 222 阅读 · 0 评论 -
PAT (Advanced Level) Practice 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 grea...原创 2019-09-07 12:03:16 · 153 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1011 World Cup Betting (20 分)
1011 World Cup Betting (20 分)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 ...原创 2019-09-07 12:03:22 · 120 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1100 Mars Numbers (20 分)
Practice 1100 Mars Numbers (20 分)People on Mars count their numbers with base 13:Zero on Earth is called “tret” on Mars.The numbers 1 to 12 on Earth is called “jan, feb, mar, apr, may, jun, jly, a...原创 2019-09-07 11:26:29 · 179 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1089 Insert or Merge (25 分)
1089 Insert or Merge (25 分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one e...原创 2019-09-07 11:22:53 · 122 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1034 Head of a Gang (30 分)
1034 Head of a Gang (30 分)One way that the police finds the head of a gang is to check people’s phone calls. If there is a phone call between A and B, we say that A and B is related. The weight of a ...原创 2019-09-07 10:46:36 · 164 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1134 Vertex Cover (25 分)
1134 Vertex Cover (25 分)A vertex cover of a graph is a set of vertices such that each edge of the graph is incident to at least one vertex of the set. Now given a graph with several vertex sets, you ...原创 2019-09-07 10:21:22 · 161 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1098 Insertion or Heap Sort (25 分)
Insertion or Heap SortAccording to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element...原创 2019-09-07 09:54:04 · 288 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1107 Social Clusters (30 分)
**1107 Social Clusters (30 分)When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the same hobbies. A social cluster is a set o...原创 2019-09-07 09:53:02 · 141 阅读 · 0 评论 -
PAT(甲级)2018年秋季考试 7-4 LCA in a Binary Tree (30 分)
7-4 LCA 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 are ...原创 2019-09-07 12:01:26 · 260 阅读 · 0 评论 -
PAT(甲级)2018年春仿真卷
7-1 Werewolf - Simple Version (20 分)7-2 Dangerous Goods Packaging (25 分)7-3 Travelling Salesman Problem (25 分)7-4 LCA in a Binary Tree (30 分)昨天在pta教育超市买了2018甲级春季的模拟题。。就做了68分,然后今天上午又买了一套秋季的,去年我刚好也...原创 2019-09-07 13:57:16 · 564 阅读 · 0 评论 -
PAT-2019年秋季考试-甲级 7-4 Dijkstra Sequence (30 分)
7-4 Dijkstra Sequence (30 分)Dijkstra’s algorithm is one of the very famous greedy algorithms. It is used for solving the single source shortest path problem which gives the shortest paths from one pa...原创 2019-09-09 14:56:46 · 962 阅读 · 0 评论 -
PAT-2019年秋季考试-甲级 7-3 后缀表达式(Postfix Expressions) (25 分)
7-3 Postfix Expression (25 分)原创 2019-09-09 14:41:54 · 845 阅读 · 0 评论 -
PAT-2019年秋季考试-甲级 7-2 Merging Linked Lists (25 分)
7-2 Merging Linked Lists (25 分)Given two singly linked lists L1 = a1→a2→⋯→an−1→an and L2 = b1→b2→⋯→bm−1→bm . If n≥2m, you are supposed to reverse and merge the shorter one into the longer on...原创 2019-09-09 14:20:10 · 1658 阅读 · 0 评论 -
PAT-2019年秋季考试-甲级 7-1 Forever (20 分)
7-1 Forever (20 分)“Forever number” is a positive integer A with K digits, satisfying the following constrains:the sum of all the digits of A is m;the sum of all the digits of A+1 is n; andthe gre...原创 2019-09-09 14:03:44 · 1685 阅读 · 3 评论 -
PAT (Advanced Level) Practice 1148 Werewolf - Simple Version (20 分)
1148 Werewolf - Simple Version (20 分)Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game,player #1 said: “Playe...原创 2019-09-07 13:56:27 · 206 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1145 Hashing - Average Search Time (25 分)
1145 Hashing - Average Search Time (25 分)The task of this problem is simple: insert a sequence of distinct positive integers into a hash table first. Then try to find another sequence of integer keys...原创 2019-09-07 13:56:34 · 133 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1146 Topological Order (25 分)
1146 Topological Order (25 分)This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtained from the given directed graph? Now you are suppo...原创 2019-09-07 13:56:42 · 198 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1154 Vertex Coloring (25 分)
1154 Vertex Coloring (25 分)A proper vertex coloring is a labeling of the graph’s vertices with colors such that no two vertices sharing the same edge have the same color. A coloring using at most k c...原创 2019-09-07 13:56:48 · 184 阅读 · 1 评论 -
PAT (Advanced Level) Practice 1151 LCA in a Binary Tree (30 分)
1151 LCA 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 are...原创 2019-09-07 13:56:54 · 163 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1150 Travelling Salesman Problem (25 分)
1150 Travelling Salesman Problem (25 分)The “travelling salesman problem” asks the following question: “Given a list of cities and the distances between each pair of cities, what is the shortest possi...原创 2019-09-07 13:57:07 · 194 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1152 Google Recruitment (20 分)
1152 Google Recruitment (20 分)In July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the picture below) for recruitment. The content is super-simple, a URL con...原创 2019-09-07 13:57:11 · 286 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1066 Root of AVL Tree (25 分)
1066 Root of AVL Tree (25 分)An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by ...原创 2019-09-07 01:02:54 · 128 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1099 Build A Binary Search Tree (30 分)
1099 Build A Binary Search Tree (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 with keys l...原创 2019-09-07 01:01:28 · 135 阅读 · 0 评论 -
PAT (Advanced Level) Practice 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 path b...原创 2019-07-09 12:32:12 · 239 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1021 Deepest Root (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 in a highest tree. Such a root ...原创 2019-07-09 00:56:53 · 161 阅读 · 0 评论 -
PAT (Advanced Level) Practice 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 must know immediately if we nee...原创 2019-07-08 19:23:52 · 119 阅读 · 0 评论 -
PAT (Advanced Level) 1028 List Sorting (25 分)
1028List Sorting(25分)Excel can sort records according to any column. Now you are supposed to imitate this function.Input Specification:Each input file contain...原创 2019-06-23 01:25:43 · 169 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1025 PAT Ranking (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 several places, and the ranklists w...原创 2019-06-17 01:08:01 · 141 阅读 · 0 评论 -
PAT (Advanced Level) 1014: 芯片测试
1014: 芯片测试时间限制:1 Sec内存限制:128 MB题目描述 基础练习 芯片测试 时间限制:1.0s 内存限制:512.0MB 问题描述 有n(2≤n≤20)块芯片,有好有坏,已知好芯片比坏芯片多。 每个芯片都能用来测试其他芯片。用好芯片测试其他芯片时,能正确给出被测试芯片是好还是坏。而用坏芯片测试其他芯片时,会...原创 2018-08-13 17:08:36 · 693 阅读 · 0 评论 -
PAT (Advanced Level) 1147 Heaps
PAT (Advanced Level) Practice编程题1147Heaps(30分)In computer science, aheapis a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then th...原创 2018-08-16 02:21:29 · 231 阅读 · 0 评论 -
PAT (Advanced Level) 1034 Head of a Gang(30 分)
1034Head of a Gang(30分)One way that the police finds the head of a gang is to check people's phone calls. If there is a phone call betweenAandB, we say thatAandBis related. The weight of a ...原创 2018-08-25 15:38:27 · 401 阅读 · 0 评论 -
PAT (Advanced Level) 1076 Forwards on Weibo(30 分)
1076Forwards on Weibo(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 formed wit...原创 2018-08-25 17:57:48 · 234 阅读 · 0 评论 -
PAT (Advanced Level) 1003 Emergency(25 分)
1003Emergency(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 ...原创 2018-08-27 10:39:55 · 550 阅读 · 0 评论 -
PAT (Advanced Level) 1018 Public Bike Management(30 分)
1018Public 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 retu...原创 2018-08-27 20:18:56 · 615 阅读 · 0 评论 -
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 pair...原创 2019-07-04 02:33:36 · 274 阅读 · 1 评论 -
1012 The Best Rank (25 分)
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 or Linear Algrbra), and E - Engli...原创 2019-07-05 00:49:05 · 180 阅读 · 0 评论