随笔分类 -  PAT

摘要:On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on sc 阅读全文
posted @ 2019-08-11 22:35 自由之翼Az 阅读(140) 评论(0) 推荐(0)
摘要:Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and 阅读全文
posted @ 2019-08-11 20:45 自由之翼Az 阅读(187) 评论(0) 推荐(0)
摘要:Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output Fu first if it is negative. For exampl 阅读全文
posted @ 2019-08-11 20:25 自由之翼Az 阅读(306) 评论(0) 推荐(0)
摘要:Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum. Input Specification: Each input file contains one 阅读全文
posted @ 2019-08-09 13:28 自由之翼Az 阅读(186) 评论(0) 推荐(0)
摘要:It is said that in 2011, there are about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if y 阅读全文
posted @ 2019-08-09 12:58 自由之翼Az 阅读(176) 评论(0) 推荐(0)
摘要:A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer 阅读全文
posted @ 2019-08-09 10:18 自由之翼Az 阅读(191) 评论(0) 推荐(0)
摘要:The 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. 阅读全文
posted @ 2019-08-08 23:17 自由之翼Az 阅读(260) 评论(0) 推荐(0)
摘要:The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the s 阅读全文
posted @ 2019-08-08 14:19 自由之翼Az 阅读(198) 评论(0) 推荐(0)
摘要:Weibo 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 n 阅读全文
posted @ 2019-08-08 11:07 自由之翼Az 阅读(217) 评论(0) 推荐(0)
摘要:The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you are supposed to generate the ranklist 阅读全文
posted @ 2019-08-07 14:54 自由之翼Az 阅读(215) 评论(0) 推荐(0)
摘要:Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, 阅读全文
posted @ 2019-08-07 11:39 自由之翼Az 阅读(262) 评论(0) 推荐(0)
摘要:Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+- 阅读全文
posted @ 2019-08-07 10:06 自由之翼Az 阅读(231) 评论(0) 推荐(0)
摘要:A gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as far away as po 阅读全文
posted @ 2019-08-06 23:10 自由之翼Az 阅读(494) 评论(0) 推荐(0)
摘要: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 cou 阅读全文
posted @ 2019-08-06 20:50 自由之翼Az 阅读(233) 评论(0) 推荐(0)
摘要:People often have a preference among synonyms of the same word. For example, some may prefer "the police", while others may prefer "the cops". Analyzi 阅读全文
posted @ 2019-08-06 10:38 自由之翼Az 阅读(191) 评论(0) 推荐(0)
摘要:Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional 阅读全文
posted @ 2019-08-06 09:24 自由之翼Az 阅读(223) 评论(0) 推荐(0)
摘要: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 tha 阅读全文
posted @ 2019-08-05 23:29 自由之翼Az 阅读(221) 评论(0) 推荐(0)
摘要:An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any 阅读全文
posted @ 2019-08-05 22:42 自由之翼Az 阅读(171) 评论(0) 推荐(0)
摘要:For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decre 阅读全文
posted @ 2019-08-05 14:47 自由之翼Az 阅读(227) 评论(0) 推荐(0)
摘要:Given three integers A, B and C in [−], you are supposed to tell whether A+B>C. Input Specification: The first line of the input gives the positive nu 阅读全文
posted @ 2019-08-03 19:21 自由之翼Az 阅读(332) 评论(0) 推荐(0)