![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT-A
shuest
这个作者很懒,什么都没留下…
展开
-
A 1121. Damn Single (25)
时间限制300 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, Yue"Damn Single (单身狗)" is the Chinese nickname for someone who is being single.原创 2016-12-11 22:38:58 · 309 阅读 · 0 评论 -
A1042. Shuffling Machine (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 employees collaborate with gamblers原创 2016-12-02 15:23:43 · 278 阅读 · 0 评论 -
A1046. Shortest Distance (20)
The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.Input Specification:Each input file contains o原创 2016-12-02 16:23:33 · 209 阅读 · 0 评论 -
1065. A+B and C (64bit) (20)
Given three integers A, B and C in [-263, 263], you are supposed to tell whether A+B > C.Input Specification:The first line of the input gives the positive number of test cases, T (<=10). Then T test c原创 2016-12-02 17:02:55 · 269 阅读 · 0 评论 -
A1056. Mice and Rice (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 each mouse is to eat as much rice原创 2016-12-02 20:08:18 · 156 阅读 · 0 评论 -
A1032. Sharing (25)
To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same suffix. For example,原创 2016-12-03 22:28:15 · 265 阅读 · 0 评论 -
A1103. Integer Factorization (30)
The K-P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program to find the K-P factorization of N for any positive原创 2016-12-05 18:11:01 · 225 阅读 · 0 评论 -
A1020. Tree Traversals (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 order traversal sequence of the corr原创 2016-12-06 22:39:51 · 160 阅读 · 0 评论 -
A1001. A+B Format (20)
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).InputEach input file contains原创 2016-12-14 23:50:53 · 254 阅读 · 0 评论 -
A1120. Friend Numbers (20)
1120. Friend Numbers (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueTwo integers are called "friend numbers" if原创 2016-12-11 22:28:45 · 281 阅读 · 0 评论 -
A1091. Acute Stroke (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 each MRI slice, your job is to ca原创 2016-12-05 22:51:29 · 228 阅读 · 0 评论 -
A1005. 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 contains one test case. E原创 2016-12-15 12:41:51 · 180 阅读 · 0 评论 -
A1008. Elevator (20)
时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe highest building in our city has only one elevator. A request list is ma原创 2016-12-25 23:50:32 · 173 阅读 · 0 评论 -
A1006. Sign In and Sign Out (25)
时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, YueAt the beginning of every day, the first person who signs in the computer room w原创 2016-12-27 09:41:49 · 229 阅读 · 0 评论 -
A1011. World Cup Betting (20)
时间限制 400 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueWith the 2010 FIFA World Cup running, football fans the world over were becoming increasin原创 2016-12-27 09:37:42 · 222 阅读 · 0 评论 -
A1036. Boys vs Girls (25)
时间限制 400 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueThis time you are asked to tell the difference between the lowest grade of all the male st原创 2016-12-28 12:12:42 · 164 阅读 · 0 评论 -
A1012. The Best Rank (25)
时间限制 400 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueTo evaluate the performance of our first year CS majored students, we consider their grade原创 2016-12-29 10:01:07 · 184 阅读 · 0 评论 -
A1062. Talent and Virtue (25)
时间限制 200 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, LiAbout 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talk原创 2016-12-30 12:30:57 · 245 阅读 · 0 评论 -
A1028. List Sorting (25)
时间限制 200 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueExcel can sort records according to any column. Now you are supposed to imitate this funct原创 2016-12-31 12:18:46 · 173 阅读 · 0 评论 -
A1055. The World's Richest (25)
Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to simulate this job, but concentrate only on the people in a certain range of ages. That is, given the net wor原创 2017-01-14 10:23:42 · 302 阅读 · 0 评论 -
A1070. Mooncake (25)
时间限制 100 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueMooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. M原创 2017-01-15 21:49:59 · 251 阅读 · 0 评论 -
A1016. Phone Bills (25)
时间限制 400 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueA long-distance telephone company charges its customers by the following rules:Making a原创 2017-01-12 10:00:58 · 188 阅读 · 0 评论 -
A1066. 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 more than one, rebalancing is原创 2017-02-08 20:47:32 · 176 阅读 · 0 评论 -
A1107. 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 of people who have some of th原创 2017-02-09 09:53:45 · 169 阅读 · 0 评论 -
A1075. PAT Judge (25)
时间限制 200 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueThe ranklist of PAT is generated from the status list, which shows the scores of the submi原创 2017-01-19 11:08:55 · 239 阅读 · 0 评论 -
A1034. Head of a Gang (30)
时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueOne way that the police finds the head of a gang is to check people's phone原创 2017-02-18 23:58:22 · 275 阅读 · 0 评论 -
A1083. List Grades (25)
时间限制 400 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueGiven a list of N student records with name, ID and grade. You are supposed to sort the re原创 2017-01-20 12:39:28 · 245 阅读 · 0 评论 -
A1080. Graduate Admission (30)
时间限制 200 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueIt is said that in 2013, there were about 100 graduate schools ready to proceed over 40,00原创 2017-01-20 16:17:39 · 225 阅读 · 0 评论 -
A1098. Insertion or Heap Sort (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 element from the input data,原创 2017-02-10 22:53:01 · 271 阅读 · 0 评论 -
A1102. Invert a Binary Tree (25)
时间限制 400 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueThe following is from Max Howell @twitter:Google: 90% of our engineers use the software原创 2017-01-21 19:13:49 · 155 阅读 · 0 评论 -
A1013. 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原创 2017-02-11 22:42:20 · 248 阅读 · 0 评论 -
A1021. 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原创 2017-02-12 22:54:37 · 204 阅读 · 0 评论 -
A1090. Highest Price in Supply Chain (25)
时间限制 200 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueA supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- eve原创 2017-01-23 10:49:43 · 172 阅读 · 0 评论 -
A1079. Total Sales of Supply Chain (25)
时间限制 250 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueA supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- eve原创 2017-01-22 16:19:47 · 232 阅读 · 0 评论 -
A1094. The Largest Generation (25)
时间限制 200 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueA family hierarchy is usually presented by a pedigree tree where all the nodes on the same原创 2017-01-23 12:51:14 · 190 阅读 · 0 评论 -
A1106. Lowest Price in Supply Chain (25)
时间限制 200 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueA supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- eve原创 2017-01-24 17:23:33 · 208 阅读 · 0 评论 -
A1004. Counting Leaves (30)
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.InputEach input file contains one test case. Each case starts with a lin原创 2017-01-24 20:02:40 · 252 阅读 · 0 评论 -
A1053. Path of Equal Weight (30)
Given a non-empty tree with root R, and with weight Wi assigned to each tree node Ti. Theweight of a path from R to L is defined to be the sum of the weights of all the nodes along the path from R t原创 2017-01-31 20:47:17 · 164 阅读 · 0 评论 -
A1043. Is It a Binary Search Tree (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 keys less than the node's key.The right原创 2017-01-31 22:32:17 · 202 阅读 · 0 评论 -
A1064. Complete 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 less than the node's key.The right原创 2017-02-02 19:25:04 · 198 阅读 · 0 评论