浙大PAT解题报告
文章平均质量分 80
尼亚3c
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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 de ll rlowoThat is, the characters must be pr原创 2017-03-17 19:08:11 · 229 阅读 · 0 评论 -
PAT 1024. Palindromic Number (25)
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 single digit numbers are palindromic numbers原创 2017-03-14 10:04:55 · 295 阅读 · 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 w原创 2017-03-14 11:45:52 · 212 阅读 · 0 评论 -
PAT 1029. Median (25)
Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1={11, 12, 13, 14} is 12, and the median of S2={9, 10, 15, 16, 17} is 15. The原创 2017-03-14 13:49:27 · 211 阅读 · 0 评论 -
PAT 1028. List Sorting (25)
Excel can sort records according to any column. Now you are supposed to imitate this function.InputEach input file contains one test case. For each case, the first line contains two integers N原创 2017-03-14 17:14:16 · 210 阅读 · 0 评论 -
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 shortest path b原创 2017-03-15 15:50:23 · 250 阅读 · 0 评论 -
1039. Course List for Student (25)
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 registered course list for each student who comes原创 2017-07-29 14:40:41 · 254 阅读 · 0 评论 -
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.Input S原创 2017-07-30 14:40:38 · 246 阅读 · 0 评论 -
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 from R t原创 2017-07-31 17:22:23 · 268 阅读 · 0 评论 -
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 the peopl原创 2017-07-31 21:14:14 · 363 阅读 · 0 评论 -
PAT题目分类
树:1043(判断给定序列是否为BST或镜像BST的先序序列,如是,给出相应的后序序列)原创 2017-07-28 11:03:59 · 356 阅读 · 0 评论 -
PAT 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.The righ原创 2017-07-28 11:00:16 · 255 阅读 · 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-07-28 16:07:56 · 316 阅读 · 0 评论 -
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 remaining parts原创 2017-07-29 00:35:39 · 236 阅读 · 0 评论 -
PAT 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 digits are for Red, the middle 2 dig原创 2017-03-13 13:08:47 · 206 阅读 · 0 评论 -
PAT 1023. Have Fun with Numbers (20)
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, which happens to be another 9-digit number con原创 2017-03-13 14:38:25 · 240 阅读 · 0 评论 -
PAT 1032. 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,原创 2017-03-17 22:43:15 · 197 阅读 · 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 cor原创 2017-03-04 23:05:29 · 271 阅读 · 0 评论 -
浙大PAT 1021. 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-03-05 13:55:42 · 245 阅读 · 0 评论 -
PAT 1035 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 (one) from l (L原创 2017-03-19 20:30:30 · 453 阅读 · 0 评论 -
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 contains o原创 2017-03-19 21:00:50 · 425 阅读 · 0 评论 -
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 bets on原创 2017-03-19 23:10:37 · 226 阅读 · 0 评论 -
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 one test c原创 2017-03-20 09:15:21 · 336 阅读 · 0 评论 -
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 with gambler原创 2017-03-20 12:09:59 · 252 阅读 · 0 评论 -
PAT 1093. Count PAT's (25)
The string APPAPT contains two PAT's as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed by the 3rd, the 4th, and the 6th characters.No原创 2017-03-20 15:42:35 · 287 阅读 · 0 评论 -
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 product b原创 2017-03-20 16:34:01 · 218 阅读 · 0 评论 -
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-3214-0229-8原创 2017-03-20 18:16:15 · 274 阅读 · 0 评论 -
PAT 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 single digit numbers are palindromic numbers原创 2017-03-12 20:29:33 · 237 阅读 · 0 评论 -
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 called the d原创 2017-03-29 10:20:55 · 362 阅读 · 0 评论 -
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 input file c原创 2017-07-29 11:18:54 · 267 阅读 · 0 评论
分享