![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pat甲级
文章平均质量分 91
丧啊多
ddd
展开
-
2021春PAT甲级满分题解
orz:第一题素数筛+暴力 注意处理n==1的情况,第二题区间贪心,算法笔记上有原题,第三题水题,注意是逐个插入建树,所以是向上调整,第四题忘了floyd怎么写的,用的n遍dijkstra7-1 Arithmetic Progression of Primes (20 分)In mathematics, an arithmetic progression (AP,等差数列) is a sequence of numbers such that the difference between the con原创 2021-03-16 23:22:39 · 1121 阅读 · 1 评论 -
1078 Hashing (25 分)
1078 Hashing (25 分)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. The hash function is defined t...原创 2019-10-20 15:42:49 · 168 阅读 · 0 评论 -
1015 Reversible Primes (20 分)
1015 Reversible Primes (20 分)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 prime becau...原创 2019-10-20 15:41:07 · 105 阅读 · 0 评论 -
1063 Set Similarity (25 分)
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 t...原创 2019-10-20 15:39:08 · 111 阅读 · 0 评论 -
1104 Sum of Number Segments (20 分)
1104 Sum of Number Segments (20 分)Given a sequence of positive numbers, a segment is defined to be a consecutive subsequence. For example, given the sequence { 0.1, 0.2, 0.3, 0.4 }, we have 10 segmen...原创 2019-10-15 21:23:59 · 86 阅读 · 0 评论 -
1039 Course List for Student (25 分)
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 cou...原创 2019-10-15 21:19:33 · 72 阅读 · 0 评论 -
1047 Student List for Course (25 分)
1047 Student List for Course (25 分)Zhejiang University has 40,000 students and provides 2,500 courses. Now given the registered course list of each student, you are supposed to output the student nam...原创 2019-10-15 21:17:28 · 69 阅读 · 0 评论 -
1069 The Black Hole of Numbers (20 分)
1069 The Black Hole of Numbers (20 分)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-decreasing order,...原创 2019-10-14 15:48:42 · 76 阅读 · 0 评论 -
1049 Counting Ones (30 分)
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 bein...原创 2019-10-13 15:56:59 · 157 阅读 · 0 评论 -
1008 Elevator
1008 Elevator (20 分)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 specified ...原创 2019-10-13 15:46:31 · 133 阅读 · 0 评论