自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(34)
  • 收藏
  • 关注

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

2020-03-31 21:51:10 74

原创 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 name lists of all the cou...

2020-03-30 00:16:28 77

原创 1022 Digital Library (30分)

文章目录问题解决方法后记问题A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique ...

2020-03-29 21:05:50 72

原创 1071 Speech Patterns (25分)

文章目录问题解决方法后记问题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 narro...

2020-03-29 15:08:28 197

原创 1063 Set Similarity (25分)

文章目录问题解决方法问题Given two sets of integers, the similarity of the sets is defined to be N​c​​/N​t​​×100%, where N​c​​ is the number of distinct common numbers shared by the two sets, and N​t​​ is the to...

2020-03-29 12:18:22 73

原创 1039 Course List for Student (25分)

文章目录问题解决方法vector的组合(头铁正面刚系列23分)将string转化为数字问题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 reg...

2020-03-28 02:29:06 88

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

2020-03-26 21:42:46 131

原创 1023 Have Fun with Numbers (20分)

文章目录问题解决方法code 1 11分问题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 an...

2020-03-26 12:53:48 94

原创 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 = p​1​​​k​1​​​​×p​2​​​k​2​​​​×⋯×p​m​​​k​m​​​​.Input Specification:Each...

2020-03-26 00:12:54 96

原创 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 because its reverse...

2020-03-23 20:30:02 84

原创 1088 Rational Arithmetic (20分)

文章目录问题解决方法问题For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.Input Specification:Each input file contain...

2020-03-22 21:03:08 87

原创 1081 Rational Sum (20分)

文章目录问题解决方法问题Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum.Input Specification:Each input file contains one test case. Each case starts with a ...

2020-03-22 18:33:41 63

原创 1101 Quick Sort (25分)

文章目录问题解决方法问题There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then the elements less than the pivot are m...

2020-03-21 17:13:09 81

原创 1093 Count PAT's (25分)

文章目录问题解决方法后记问题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,...

2020-03-15 15:39:55 61

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

2020-03-15 14:24:12 79

原创 1010 Radix (25分)

文章目录问题解决方法后记问题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 o...

2020-03-10 10:04:14 69

原创 1085 Perfect Sequence (25point(s))

文章目录问题解决方法问题Given a sequence of positive integers and another positive integer p. The sequence is said to be a perfect sequence if M≤m×p where M and m are the maximum and minimum numbers in the sequ...

2020-03-09 17:56:36 151

原创 1067 Sort with Swap(0, i) (25point(s))

文章目录问题解决方法问题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 that is allowed to use? For example, to s...

2020-03-09 16:07:20 179

原创 1038 Recover the Smallest Number (30point(s))

文章目录问题解决方法后记问题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 ...

2020-03-06 11:38:36 143

原创 1037 Magic Coupon (25point(s))

文章目录问题解决方法后记问题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 o...

2020-03-05 23:42:35 93

原创 1070 Mooncake (25point(s))

文章目录问题解决方法问题Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional mooncakes according to the region’s...

2020-03-05 11:53:18 103

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

2020-03-04 18:44:30 86

原创 1005 继续(3n+1)猜想 (25 分)

文章目录问题解决方法问题卡拉兹(Callatz)猜想已经在1001中给出了描述。在这个题目里,情况稍微有些复杂。当我们验证卡拉兹猜想的时候,为了避免重复计算,可以记录下递推过程中遇到的每一个数。例如对 n=3 进行验证的时候,我们需要计算 3、5、8、4、2、1,则当我们对 n=5、8、4、2 进行验证的时候,就可以直接判定卡拉兹猜想的真伪,而不需要重复计算,因为这 4 个数已经在验证3的时...

2020-03-04 17:16:05 74

原创 1050 String Subtraction (20分)

文章目录问题解决方法后记问题Given two strings S​1​​ and S​2​​, S=S​1​​−S​2​​ is defined to be the remaining string after taking all the characters in S​2​​ from S​1​​. Your task is simply to calculate S​1​​−S​2​​...

2020-03-04 16:59:14 101

原创 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,10​4​​]. The firs...

2020-03-04 10:31:27 246

原创 1047 编程团体赛 (20分)

文章目录问题解决方法问题编程团体赛的规则为:每个参赛队由若干队员组成;所有队员独立比赛;参赛队的成绩为所有队员的成绩和;成绩最高的队获胜。现给定所有队员的比赛成绩,请你编写程序找出冠军队。输入格式:输入第一行给出一个正整数 N(≤10​4​​),即所有参赛队员总数。随后 N 行,每行给出一位队员的成绩,格式为:队伍编号-队员编号 成绩,其中队伍编号为 1 到 1000 的正整数,队员编号...

2020-03-04 09:57:16 178

原创 1043 输出PATest (20分)

文章目录问题解决方法后记问题给定一个长度不超过 10​4​​ 的、仅由英文字母构成的字符串。请将字符重新调整顺序,按 PATestPATest… 这样的顺序输出,并忽略其它字符。当然,六种字符的个数不一定是一样多的,若某种字符已经输出完,则余下的字符仍按 PATest 的顺序打印,直到所有字符都被输出。输入格式:输入在一行中给出一个长度不超过 10​4​​ 的、仅由英文字母构成的非空字符串...

2020-03-04 09:52:31 69

原创 1042 字符统计 (20分)

文章目录问题解决方法后记问题请编写程序,找出一段给定文字中出现最频繁的那个英文字母。输入格式:输入在一行中给出一个长度不超过 1000 的字符串。字符串由 ASCII 码表中任意可见字符及空格组成,至少包含 1 个英文字母,以回车结束(回车不算在内)。输出格式:在一行中输出出现频率最高的那个英文字母及其出现次数,其间以空格分隔。如果有并列,则输出按字母序最小的那个字母。统计时不区分大小...

2020-03-04 09:47:58 234

原创 1039 到底买不买 (20分)

文章目录问题解决方法后记问题1039 到底买不买 (20分)小红想买些珠子做一串自己喜欢的珠串。卖珠子的摊主有很多串五颜六色的珠串,但是不肯把任何一串拆散了卖。于是小红要你帮忙判断一下,某串珠子里是否包含了全部自己想要的珠子?如果是,那么告诉她有多少多余的珠子;如果不是,那么告诉她缺了多少珠子。为方便起见,我们用[0-9]、[a-z]、[A-Z]范围内的字符来表示颜色。例如在图1中,第3串...

2020-03-04 09:04:15 98

原创 1038 统计同成绩学生 (20分)

文章目录问题解决方法问题本题要求读入 N 名学生的成绩,将获得某一给定分数的学生人数输出。输入格式:输入在第 1 行给出不超过 10​5​​ 的正整数 N,即学生总人数。随后一行给出 N 名学生的百分制整数成绩,中间以空格分隔。最后一行给出要查询的分数个数 K(不超过 N 的正整数),随后是 K 个分数,中间以空格分隔。输出格式:在一行中按查询顺序给出得分等于指定分数的学生人数,中间以...

2020-03-03 23:37:42 107

原创 1033 旧键盘打字 (20分)

文章目录问题解决方法问题旧键盘上坏了几个键,于是在敲一段文字的时候,对应的字符就不会出现。现在给出应该输入的一段文字、以及坏掉的那些键,打出的结果文字会是怎样?输入格式:输入在 2 行中分别给出坏掉的那些键、以及应该输入的文字。其中对应英文字母的坏键以大写给出;每段文字是不超过 10​5​​ 个字符的串。可用的字符包括字母 [a-z, A-Z]、数字 0-9、以及下划线 _(代表空格)、,...

2020-03-03 23:22:24 86

原创 1029 旧键盘 (20分)/1084 Broken Keyboard (20分)

文章目录问题解决方法问题旧键盘上坏了几个键,于是在敲一段文字的时候,对应的字符就不会出现。现在给出应该输入的一段文字、以及实际被输入的文字,请你列出肯定坏掉的那些键。输入格式:输入在 2 行中分别给出应该输入的文字、以及实际被输入的文字。每段文字是不超过 80 个字符的串,由字母 A-Z(包括大、小写)、数字 0-9、以及下划线 _(代表空格)组成。题目保证 2 个字符串均非空。输出格式...

2020-03-03 14:40:29 70

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

2020-03-03 12:46:51 178

原创 1075 PAT Judge (25分)+测试点分析

文章目录问题解决方法测试点分析后记问题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 for PAT.Input Specification:...

2020-03-03 10:08:15 1592 1

空空如也

空空如也

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

TA关注的人

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