浙大pat甲级
文章平均质量分 67
蜗牛嘻嘻
这个作者很懒,什么都没留下…
展开
-
A1039.Course List for Student
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 f原创 2017-04-12 15:35:04 · 226 阅读 · 0 评论 -
A1048. Find Coins
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. However,原创 2017-11-02 21:39:13 · 192 阅读 · 0 评论 -
A1010. Radix
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is “yes”, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive integ原创 2017-11-02 21:18:28 · 295 阅读 · 0 评论 -
A1044. Shopping in Mars
Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M).Whenmakingthepayment,thechaincanbecutatanypositionforonlyonceands原创 2017-11-01 20:49:50 · 206 阅读 · 0 评论 -
A10120. Tree Traversals
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 corr原创 2017-04-27 17:47:11 · 224 阅读 · 0 评论 -
A1052.Linked List Sorting
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. Now given原创 2017-04-21 17:26:53 · 205 阅读 · 0 评论 -
A1032.Sharing
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-04-21 17:25:32 · 205 阅读 · 0 评论 -
A1054.The Dominant Color
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 do原创 2017-04-17 10:18:37 · 211 阅读 · 0 评论 -
A1063.Set Similarity
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 distinct numb原创 2017-04-16 16:00:02 · 277 阅读 · 0 评论 -
A1060.Are They Equal
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 significan原创 2017-04-16 15:27:07 · 225 阅读 · 0 评论 -
A1086. Tree Traversals Again
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 stack原创 2017-04-28 16:42:20 · 288 阅读 · 0 评论 -
A1071.Speech Patterns
People 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 narrow down a speaker’原创 2017-04-17 16:35:40 · 214 阅读 · 0 评论 -
A1047.Student List for Course
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 Specif原创 2017-04-12 15:37:03 · 457 阅读 · 1 评论 -
A1029. Median
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-11-04 20:16:48 · 211 阅读 · 0 评论