![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT甲级
漫浸天空的雨色
The destination of creating human is let them construct Silicon-based life.
展开
-
PAT 甲级 1007 Maximum Subsequence Sum
1007Maximum Subsequence Sum(25 point(s))Given a sequence ofKintegers {N1,N2, ...,NK}. A continuous subsequence is defined to be {Ni,Ni+1, ...,Nj} where1≤i≤j≤K. The Max...原创 2019-01-17 11:45:59 · 704 阅读 · 2 评论 -
PAT 甲级 1008 Elevator
1008 Elevator (20 point(s))The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in sp...原创 2019-01-17 12:12:19 · 494 阅读 · 0 评论 -
PAT 甲级 1009 Product of Polynomials
1009 Product of Polynomials (25 point(s))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-01-17 20:17:49 · 703 阅读 · 0 评论 -
PAT 甲级 1010 Radix
1010Radix(25 point(s))Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer isyes, if 6 is a decimal number and 110 is a binary number.Now for...原创 2019-01-17 22:19:15 · 712 阅读 · 8 评论 -
PAT 甲级 1011 World Cup Betting
1011 World Cup Betting (20 point(s))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 th...原创 2019-01-18 16:11:39 · 589 阅读 · 0 评论 -
PAT 甲级 1034 Head of a Gang
1034 Head of a Gang (30 point(s))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 weig...原创 2019-01-23 21:01:28 · 674 阅读 · 0 评论 -
PAT 甲级 1035 Password
1035 Password (20 point(s))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 d...原创 2019-01-23 21:49:02 · 372 阅读 · 0 评论 -
PAT 甲级 1036 Boys vs Girls
1036 Boys vs Girls (25 point(s))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.Input Specificatio...原创 2019-01-23 22:38:42 · 449 阅读 · 0 评论 -
PAT 甲级 1037 Magic Coupon
1037 Magic Coupon (25 point(s))The 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 ...原创 2019-01-23 23:50:52 · 461 阅读 · 0 评论 -
PAT 甲级 1012 The Best Rank
1012 The Best Rank (25 point(s))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 (Calcul...原创 2019-01-18 17:54:02 · 750 阅读 · 0 评论 -
PAT 甲级 1013 Battle Over Cities
1013 Battle Over Cities (25 point(s))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 clo...原创 2019-01-18 18:57:58 · 494 阅读 · 0 评论 -
PAT 甲级 1014 Waiting in Line
1014 Waiting in Line (30 point(s))Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the custo...原创 2019-01-18 22:27:53 · 791 阅读 · 0 评论 -
PAT 甲级 1015 Reversible Primes
1015 Reversible Primes (20 point(s))A 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 pri...原创 2019-01-18 23:41:16 · 696 阅读 · 0 评论 -
PAT 甲级 1016 Phone Bills
1016 Phone Bills (25 point(s))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...原创 2019-01-19 22:38:43 · 568 阅读 · 0 评论 -
PAT 甲级 1017 Queueing at Bank
1017 Queueing at Bank (25 point(s))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...原创 2019-01-20 11:15:50 · 515 阅读 · 0 评论 -
PAT 甲级 1018 Public Bike Management
1018 Public Bike Management (30 point(s))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 ...原创 2019-01-20 12:46:16 · 610 阅读 · 0 评论 -
PAT 甲级 1019 General Palindromic Number
1019 General Palindromic Number (20 point(s))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. A...原创 2019-01-20 16:54:45 · 484 阅读 · 0 评论 -
PAT 甲级 1020 Tree Traversals
1020 Tree Traversals (25 point(s))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...原创 2019-01-20 17:58:37 · 570 阅读 · 2 评论 -
PAT 甲级 1021 Deepest Root
1021 Deepest Root (25 point(s))A graph which is connected and acyclic can be considered a tree. The hight of the tree depends on the selected root. Now you are supposed to find the root that results...原创 2019-01-20 23:07:10 · 504 阅读 · 0 评论 -
PAT 甲级 1022 Digital Library
1022 Digital Library (30 point(s))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...原创 2019-01-20 23:59:23 · 413 阅读 · 0 评论 -
PAT 甲级 1023 Have Fun with Numbers
1023 Have Fun with Numbers (20 point(s))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, whic...原创 2019-01-21 11:53:56 · 522 阅读 · 3 评论 -
PAT 甲级 1038 Recover the Smallest Number
1038 Recover the Smallest Number (30 point(s))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...原创 2019-01-26 11:50:37 · 449 阅读 · 0 评论 -
PAT 甲级 1024 Palindromic Number
1024 Palindromic Number (25 point(s))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 singl...原创 2019-01-21 18:48:27 · 441 阅读 · 0 评论 -
PAT 甲级 1025 PAT Ranking
1025 PAT Ranking (25 point(s))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 sev...原创 2019-01-21 19:21:37 · 563 阅读 · 1 评论 -
PAT 甲级 1001 A+B Format
1001 A+B Format (20 point(s))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).In...原创 2019-01-16 11:50:01 · 4194 阅读 · 16 评论 -
PAT 甲级 1039 Course List for Student
1039 Course List for Student (25 point(s))Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the regist...原创 2019-01-26 19:50:17 · 378 阅读 · 0 评论 -
PAT 甲级 1040 Longest Symmetric String
1040 Longest Symmetric String (25 point(s))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 symmet...原创 2019-01-26 20:22:12 · 460 阅读 · 0 评论 -
PAT 甲级 1041 Be Unique
1041 Be Unique (20 point(s))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...原创 2019-01-26 20:36:51 · 346 阅读 · 0 评论 -
PAT 甲级 1042 Shuffling Machine
1042 Shuffling Machine (20 point(s))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" wh...原创 2019-01-26 21:11:52 · 433 阅读 · 0 评论 -
PAT 甲级 1026 Table Tennis
1026 Table Tennis (30 point(s))A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open when they arrive,...原创 2019-01-21 23:24:17 · 691 阅读 · 0 评论 -
PAT 甲级 1002 A+B for Polynomials
1002 A+B for Polynomials (25 point(s))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 l...原创 2019-01-16 15:42:12 · 2068 阅读 · 4 评论 -
PAT 甲级 1059 Prime Factors
1059 Prime Factors (25 point(s))Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1k1×p2k2×⋯×pmkm.Input ...原创 2019-02-01 11:05:22 · 432 阅读 · 0 评论 -
PAT 甲级 1060 Are They Equal
1060 Are They Equal (25 point(s))If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0.123×105 with simple chopp...原创 2019-02-01 14:00:28 · 405 阅读 · 0 评论 -
PAT 甲级 1003 Emergency
1003 Emergency (25 point(s))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 rescu...原创 2019-01-16 18:05:55 · 1435 阅读 · 8 评论 -
PAT 甲级 1004 Counting Leaves
1004 Counting Leaves (30 point(s))A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.Input Specification:Each input file cont...原创 2019-01-16 19:10:21 · 1169 阅读 · 0 评论 -
PAT 甲级 1005 Spell It Right
1005 Spell It Right (20 point(s))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 inp...原创 2019-01-16 21:44:50 · 601 阅读 · 0 评论 -
PAT 甲级 1006 Sign In and Sign Out
1006 Sign In and Sign Out (25 point(s))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 t...原创 2019-01-16 22:10:21 · 698 阅读 · 0 评论 -
PAT 甲级 1061 Dating
1061 Dating (20 point(s))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...原创 2019-02-01 17:42:55 · 432 阅读 · 4 评论 -
PAT 甲级 1062 Talent and Virtue
1062 Talent and Virtue (25 point(s))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 bei...原创 2019-02-01 18:22:55 · 349 阅读 · 0 评论 -
PAT 甲级 1063 Set Similarity
1063 Set Similarity (25 point(s))Given 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...原创 2019-02-01 22:35:44 · 357 阅读 · 0 评论