![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT甲级
文章平均质量分 81
R11happy
hello world!
展开
-
PAT甲级.1002. A+B for Polynomials (25)
1002. A+B for Polynomials (25)题目:This time, you are supposed to find A+B where A and B are two polynomials. 输入格式:Each input file contains one test case. Each case occupies 2 lines, and each line con原创 2016-07-22 23:48:20 · 357 阅读 · 0 评论 -
PAT甲级.1086. Tree Traversals Again (25)
题目An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered from 1 to 6) is traversed, the st原创 2016-10-23 10:58:45 · 393 阅读 · 0 评论 -
PAT甲级.1064. 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 righ原创 2016-10-23 11:34:49 · 394 阅读 · 0 评论 -
PAT甲级.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原创 2017-02-06 23:24:41 · 324 阅读 · 0 评论 -
PAT甲级.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 Algebra), and E - E原创 2017-02-08 22:17:48 · 344 阅读 · 0 评论 -
PAT甲级.1083. List Grades (25)
题目Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grade原创 2017-02-08 22:45:10 · 421 阅读 · 6 评论 -
PAT甲级.1096. Consecutive Factors (20)
题意Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3*5*6*7, where 5, 6, and 7 are the three consecutive numbers. Now give原创 2017-02-19 15:24:45 · 349 阅读 · 0 评论 -
PAT甲级.1049. Counting Ones (30)
题意The task is simple: given any positive integer N, you are supposed to count the total number of 1’s in the decimal form of the integers from 1 to N. For example, given N being 12, there are five 1’s原创 2017-02-19 15:34:53 · 377 阅读 · 0 评论 -
PAT甲级.1033. To Fill or Not to Fill (25)
题目With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time to time. Different原创 2017-02-12 22:42:16 · 342 阅读 · 0 评论 -
PAT甲级.1075. PAT Judge (25)
题意The ranklist of PAT is generated from the status list, which shows the scores of the submittions. This time you are supposed to generate the ranklist for PAT. 输入格式Each input file contains one tes原创 2017-02-13 00:00:42 · 512 阅读 · 0 评论 -
PAT甲级.1067. Sort with Swap(0,*) (25)
题意Given any permutation of the numbers {0, 1, 2,…, N-1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation that is allowed to use? For example, to sort {4, 0, 2原创 2017-02-14 01:16:34 · 297 阅读 · 0 评论 -
PAT甲级.1044. Shopping in Mars (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, the chain can be cut at any position原创 2017-02-15 00:23:29 · 600 阅读 · 0 评论 -
1059. Prime Factors (25).md
题意Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1^k1 * p2^k2 *…*pm^km 输入格式Each input file contains one test case which gives a p原创 2017-02-26 00:35:43 · 400 阅读 · 0 评论 -
PAT甲级1098. 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-03-11 00:00:25 · 524 阅读 · 0 评论 -
PAT甲级.1020. 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 c原创 2016-10-23 10:48:14 · 612 阅读 · 0 评论 -
PAT甲级.1036. Boys vs Girls (25)
1036. Boys vs Girls (25) 题目:This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students. 输入格式:Each input file原创 2016-08-14 01:25:32 · 556 阅读 · 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 r原创 2016-08-14 01:15:18 · 443 阅读 · 0 评论 -
PAT甲级.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. 输入格式:Each input file contains one test case. Each case occupies 2 lines, and each line原创 2016-07-23 00:34:12 · 308 阅读 · 0 评论 -
PAT甲级.1001. A+B Format (20)
1001. 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). 输入格式:Ea原创 2016-07-23 00:44:42 · 353 阅读 · 0 评论 -
PAT甲级.1031. Hello World for U (20)
1031. Hello World for U (20) 题目:Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, “helloworld” can be printed as: That is, the character原创 2016-08-15 16:41:17 · 383 阅读 · 0 评论 -
PAT甲级.1042. Shuffling Machine (20)
1042. 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 e原创 2016-07-20 23:55:51 · 436 阅读 · 0 评论 -
PAT甲级.1065. A+B and C (64bit) (20)
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. 输入格式:The first line of the input gives the positive number of test cases, T (原创 2016-07-21 23:56:06 · 453 阅读 · 0 评论 -
PAT甲级.1046. Shortest Distance (20)
1046. 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. 输入格式:Each i原创 2016-07-22 00:12:13 · 370 阅读 · 0 评论 -
PAT甲级.1019. General Palindromic Number (20)
1019. General Palindromic Number (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 s原创 2016-08-20 11:04:03 · 331 阅读 · 0 评论 -
PAT甲级.1027. Colors in Mars (20)
1027. Colors in Mars (20) 题目:People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digit原创 2016-08-20 11:19:50 · 493 阅读 · 0 评论 -
PAT甲级.1058. A+B in Hogwarts (20)
1058. A+B in Hogwarts (20) 题目:If you are a fan of Harry Potter, you would know the world of magic has its own currency system – as Hagrid explained it to Harry, “Seventeen silver Sickles to a Galleo原创 2016-08-20 12:22:36 · 395 阅读 · 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. 输入格式Each input file contains one原创 2016-08-31 10:32:31 · 384 阅读 · 0 评论 -
PAT甲级.1035. Password (20)
1035. Password (20) 题目To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distin原创 2016-08-31 10:41:18 · 345 阅读 · 0 评论 -
PAT甲级.1077. Kuchiguse (20)
1077. Kuchiguse (20) 题目The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker’s personality. Suc原创 2016-08-31 10:54:05 · 365 阅读 · 0 评论 -
PAT甲级.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 Wo原创 2016-08-11 22:58:06 · 496 阅读 · 0 评论 -
PAT甲级.1125. Chain the Ropes (25)
题意Given some segments of rope, you are supposed to chain them into one rope. Each time you may only fold two segments into loops and chain them into one piece, as shown by the figure. The resulting ch原创 2017-03-11 00:07:40 · 446 阅读 · 0 评论