自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

changeforeve的博客

写一些自己做的练习题

  • 博客(30)
  • 收藏
  • 关注

原创 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.

2017-11-22 14:11:03 203

原创 PAT甲级 1063. Set Similarity (25)

题目: 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, and Nt is the total number of d

2017-11-21 13:42:18 186

原创 PAT甲级 1062. Talent and Virtue (25)

题目: 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 being outstanding in both talent

2017-11-21 12:52:22 196

原创 PAT甲级 1061. Dating (20)

题目: 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 that those strange stri

2017-11-21 11:07:24 227

原创 PAT甲级 1060. Are They Equal (25)

题目: 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 chopping. Now given the number of

2017-11-21 09:57:48 208

原创 PAT甲级 1059. Prime Factors (25)

题目: 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. Input Specification: Each input file contains o

2017-11-20 17:21:31 215

原创 PAT甲级 1055. 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

2017-11-15 15:03:47 174

原创 PAT甲级 1054. The Dominant Color (20)

题目: Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is cal

2017-11-15 13:33:28 177

原创 PAT甲级 1053. Path of Equal Weight (30)

题目: Given a non-empty tree with root R, and with weight Wi assigned to each tree node Ti. The weight of a path from R to Lis defined to be the sum of the weights of all the nodes along the path

2017-11-15 10:50:34 167

原创 PAT甲级 1052. Linked List Sorting (25)

题目: A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key and a Next pointer to the next structure.

2017-11-15 10:18:08 160

原创 PAT甲级 1051. Pop Sequence (25)

题目: Given 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 pop sequ

2017-11-14 18:20:04 264

原创 PAT甲级 1050. String Subtraction (20)

题目: Given two strings S1 and S2, S = S1 - S2 is defined to be the remaining string after taking all the characters in S2 from S1. Your task is simply to calculate S1 - S2 for any given strings.

2017-11-14 16:28:35 177

原创 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 f

2017-11-14 16:01:09 163

原创 PAT甲级 1048. Find Coins (25)

题目: Eva 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 payments.

2017-11-14 13:45:11 209

原创 PAT甲级 1047. Student List for Course (25)

题目: Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course list of each student, you are supposed to output the student name lists of all the courses.

2017-11-14 12:58:34 231

原创 PAT甲级 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. Input Specification: Each inp

2017-11-13 21:59:41 157

原创 PAT甲级 1045. Favorite Color Stripe (30)

题目: Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in her favorite order by cutting off those unwanted pieces and sewing the remain

2017-11-13 21:19:32 166

原创 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

2017-11-13 17:27:15 203

原创 1043. 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.

2017-11-13 11:31:06 138

原创 PAT甲级 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 employees collaborate w

2017-11-09 19:33:32 130

原创 PAT甲级 1041. Be Unique (20)

题目: 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, 104]. The first one who

2017-11-09 18:50:55 192

原创 PAT甲级 1040. Longest Symmetric String (25)

题目: 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 symmetric sub-string is "s PAT&TAP s", hence

2017-11-09 17:11:37 158

原创 PAT甲级 1038. Recover the Smallest Number (30)

题目: 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 recover many numbers such like 32-321-32

2017-11-08 12:07:08 221

原创 PAT甲级 1037. Magic Coupon (25)

题目: 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 times the value of that

2017-11-08 10:38:34 159

原创 PAT甲级 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. Input Specification: Each input file c

2017-11-07 19:36:34 152

原创 PAT甲级 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 distinguish 1 (on

2017-11-07 19:09:57 142

原创 PAT甲级 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 relation is define

2017-11-07 18:34:13 165

原创 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. Dif

2017-11-07 12:01:38 148

原创 PAT甲级 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: h d e l l r lowo That is, the characters m

2017-11-04 20:58:58 192

原创 PAT甲级 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 shor

2017-11-04 20:05:45 145

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除