PTA
疾风骇客
这个作者很懒,什么都没留下…
展开
-
【PAT】1112 Stucked Keyboard (20分)(模拟 字符串处理)
题目:On a broken keyboard, some of the keys are always stucked. So when you type some sentences, the characters corresponding to those keys will appear repeatedly on screen forktimes.Now given a ...原创 2020-05-06 11:02:09 · 140 阅读 · 0 评论 -
【PAT】1077 Kuchiguse (20分)(模拟 字符串处理)
题目:The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker's personality. Such a preference is c...原创 2020-05-06 09:22:04 · 255 阅读 · 0 评论 -
【PAT】1035 Password (20分)(模拟 STL vector)
题目: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 distinguish1(one) from...原创 2020-05-05 21:52:05 · 118 阅读 · 0 评论 -
【PAT】1005 Spell It Right (20分)(模拟 字符串处理)
题目:Given a non-negative integerN, your task is to compute the sum of all the digits ofN, and output every digit of the sum in English.Input Specification:Each input file contains one test cas...原创 2020-05-05 13:56:12 · 122 阅读 · 1 评论 -
【PAT】1063 Set Similarity (25分)(模拟 STL set)
题目:Given two sets of integers, the similarity of the sets is defined to beNc/Nt×100%, whereNcis the number of distinct common numbers shared by the two sets, andNtis the total numb...原创 2020-05-05 11:29:08 · 138 阅读 · 1 评论 -
【PAT】1047 Student List for Course (25分)(模拟 STL map vector)
题目: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 courses.I...原创 2020-05-05 10:42:25 · 117 阅读 · 0 评论 -
【PAT】1039 Course List for Student (25分)(模拟,STL map vector)
题目: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 ...原创 2020-05-05 10:07:58 · 110 阅读 · 0 评论 -
【PAT】1054 The Dominant Color (20分)(模拟 STLmap)
题目: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...原创 2020-05-04 15:23:58 · 91 阅读 · 0 评论 -
【PAT】1065 A+B and C (64bit) (20分)(模拟)
题目:Given three integersA,BandCin [−263,263], you are supposed to tell whetherA+B>C.Input Specification:The first line of the input gives the positive number of test cases,T(≤10...原创 2020-05-04 14:57:24 · 142 阅读 · 0 评论 -
【PAT】1046 Shortest Distance (20分) (模拟)
题目:The task is really simple: givenNexits 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...原创 2020-05-04 14:37:30 · 104 阅读 · 0 评论 -
【PAT】1124 Raffle for Weibo Followers (20分)(模拟 字符串处理)
题目:John got a full mark on PAT. He was so happy that he decided to hold a raffle(抽奖) for his followers on Weibo -- that is, he would select winners from every N followers who forwarded his post, an...原创 2020-05-04 13:15:37 · 159 阅读 · 0 评论 -
【PAT】1140 Look-and-say Sequence (20分) (模拟 字符串处理)
题目:Look-and-say sequence is a sequence of integers as the following:D, D1, D111, D113, D11231, D112213111, ...whereDis in [0, 9] except 1. The (n+1)st number is a kind of description of the...原创 2020-05-04 12:18:04 · 138 阅读 · 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 g...原创 2020-05-04 11:12:02 · 105 阅读 · 0 评论 -
【PAT】1011 World Cup Betting (20分)(比较 模拟)
题目:With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Afri...原创 2020-05-04 09:56:42 · 162 阅读 · 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...原创 2020-05-03 21:09:16 · 186 阅读 · 0 评论 -
【PAT】1006 Sign In and Sign Out (25分) (比较 模拟)
题目:At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in's and out'...原创 2020-05-03 19:10:31 · 103 阅读 · 0 评论 -
【PAT】1008 Elevator (20分) (模拟)
题目:The highest building in our city has only one elevator. A request list is made up withNpositive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs...原创 2020-05-03 17:21:33 · 123 阅读 · 0 评论 -
【PAT】五一线上测试
准备了一周测试一下自己,难度为乙级,确实不难,但是我对STL各种不熟,还是花费了好多时间!!!引以为戒!勤加练习!一 洗牌算法(k什么洗牌算法我忘了)因为几分钟就做出来了所以忘记复制题目了...题意大概是给一个数N表示需要被洗的牌的个数,给一个随机序列{X,X,X...X},然后根据洗牌算法来打乱顺序的{1,2...N}输入:NX X X...X(输入样例我真的记不得了...原创 2020-05-01 22:11:49 · 248 阅读 · 0 评论