
PAT甲级
小白界的一股清流
就读于复旦大学计算机系。
研究领域:6D姿态估计instance-level和category-level,基于ros环境和baxter的机器人抓取。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
PAT_甲级_1002
度假结束,开始新的征程。1002 A+B for Polynomials (25 分)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 ...原创 2019-02-22 14:52:14 · 105 阅读 · 0 评论 -
PAT_甲级_1051
1051 Pop SequenceGiven a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible p...原创 2019-03-06 12:41:16 · 176 阅读 · 0 评论 -
PAT_甲级_1094
1094 The Largest GenerationA family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find the generation with the...原创 2019-03-08 17:07:39 · 167 阅读 · 1 评论 -
PAT_甲级_1043
1043 Is It a Binary Search TreeA 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 tha...原创 2019-03-08 18:18:49 · 230 阅读 · 0 评论 -
PAT_甲级_1064
1064 Complete Binary Search TreeA 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 th...原创 2019-03-08 20:54:40 · 218 阅读 · 0 评论 -
PAT_甲级_1015
1015 Reversible PrimesA 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 because its ...原创 2019-03-03 19:20:10 · 164 阅读 · 0 评论 -
PAT_甲级_1078
1078 HashingThe 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 defined to be H(...原创 2019-03-03 21:00:40 · 172 阅读 · 0 评论 -
PAT_甲级_1032
1032 SharingTo 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....原创 2019-03-06 15:52:57 · 155 阅读 · 0 评论 -
PAT_甲级_1059
1059 Prime FactorsGiven 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 .Input Specifica...原创 2019-03-03 22:55:47 · 159 阅读 · 0 评论 -
PAT_甲级_1023
1023 Have Fun with NumbersNotice 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 happens to be...原创 2019-03-04 13:12:11 · 109 阅读 · 0 评论 -
PAT_甲级_1091
1091 Acute StrokeOne 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...原创 2019-03-06 22:29:19 · 191 阅读 · 0 评论 -
PAT_甲级_1103
1103 Integer FactorizationThe 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 factoriz...原创 2019-03-06 22:35:18 · 191 阅读 · 0 评论 -
PAT_甲级_1024
1024 Palindromic NumberA 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 digit numbers...原创 2019-03-04 16:54:43 · 127 阅读 · 0 评论 -
PAT_甲级_1063
1063 Set SimilarityGiven two sets of integers, the similarity of the sets is defined to be Nc /Nt ×100%, where Nc is the number of distinct common numbers shared by the two sets, and Nt ...原创 2019-03-04 21:21:32 · 193 阅读 · 0 评论 -
PAT_甲级_1086
1086 Tree Traversals AgainAn 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 t...原创 2019-03-08 13:20:16 · 436 阅读 · 1 评论 -
PAT_甲级_1013
1013 Battle Over CitiesIt 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 kn...原创 2019-03-12 16:39:19 · 149 阅读 · 0 评论 -
PAT_甲级_1021
1021 Deepest RootA 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 ...原创 2019-03-12 17:46:11 · 267 阅读 · 0 评论 -
PAT_甲级_1076
1076 Forwards on WeiboWeibo 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 with follo...原创 2019-03-12 19:54:30 · 227 阅读 · 0 评论 -
PAT_甲级_1071
1071 Speech PatternsPeople 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 help to ...原创 2019-03-06 12:40:22 · 131 阅读 · 0 评论 -
PAT_甲级_1081
1081 Rational SumGiven N rational numbers in the form numerator/denominator, you are supposed to calculate their sum.Input Specification:Each input file contains one test case. Each case starts wit...原创 2019-03-03 16:28:22 · 173 阅读 · 0 评论 -
PAT_甲级_1102
1102Invert a Binary TreeThe following is from Max Howell @twitter:Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a whiteboard so fuck off....原创 2019-03-08 15:44:15 · 127 阅读 · 0 评论 -
PAT_甲级_1009
1009 Product of Polynomials (25 分)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, a...原创 2019-02-22 15:39:10 · 297 阅读 · 0 评论 -
PAT_1065_甲级
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 numb...原创 2019-02-22 16:28:26 · 106 阅读 · 0 评论 -
PAT_甲级_1036
1036 Boys vs GirlsThis 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.Input Specification:Each input fi...原创 2019-02-23 15:43:15 · 166 阅读 · 0 评论 -
PAT_甲级_1031
1031 Hello World for UGiven 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:h de ll rl o w oThat is, the...原创 2019-02-23 16:38:13 · 235 阅读 · 0 评论 -
PAT_甲级_1058
1058 A+B in HogwartsIf 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 Galleon and twent...原创 2019-02-24 15:16:24 · 200 阅读 · 0 评论 -
PAT_甲级_1001
1001 A+B FormatCalculate 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 Specification...原创 2019-02-24 16:01:49 · 136 阅读 · 0 评论 -
PAT_甲级_1005
1005 Spell It RightGiven 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 ...原创 2019-02-24 16:26:42 · 135 阅读 · 0 评论 -
PAT_甲级_1012
1012 The Best RankTo 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 Al...原创 2019-02-25 11:35:31 · 203 阅读 · 0 评论 -
PAT_甲级_1025
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 i...原创 2019-02-25 13:05:27 · 141 阅读 · 0 评论 -
PAT_甲级_1028
1028 List SortingExcel can sort records according to any column. Now you are supposed to imitate this function.Input Specification:Each input file contains one test case. For each case, the first l...原创 2019-02-25 16:47:01 · 179 阅读 · 0 评论 -
PAT_甲级_1092
1092 To Buy or Not to BuyEva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner ...原创 2019-02-25 17:48:57 · 111 阅读 · 0 评论 -
PAT_甲级_1048
1048 Find CoinsEva 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 coins as pa...原创 2019-02-25 18:51:40 · 183 阅读 · 0 评论 -
PAT_甲级_1037
1037 Magic CouponThe magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a product, you may get N times the value...原创 2019-02-25 22:20:00 · 150 阅读 · 0 评论 -
PAT_甲级_1038
1038 Recover the Smallest NumberGiven 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 many n...原创 2019-02-25 22:44:08 · 274 阅读 · 0 评论 -
PAT_甲级_1100
1100 Mars NumbersPeople 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, aug, sep, oct, nov...原创 2019-03-05 14:57:05 · 177 阅读 · 0 评论 -
PAT_甲级_1067
1067 Sort with Swap(0, i) (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...原创 2019-02-26 21:36:24 · 154 阅读 · 0 评论 -
PAT_甲级_1049
1049 Counting OnesThe 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, t...原创 2019-03-03 12:37:18 · 139 阅读 · 0 评论 -
PAT_甲级_1003
1003 EmergencyAs 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 in each...原创 2019-03-12 22:02:55 · 518 阅读 · 0 评论