排序
shishiness
这个作者很懒,什么都没留下…
展开
-
pat 甲级 排序 A1095 Cars on Campus (30分)
1095 Cars on Campus (30分)Zhejiang University has 8 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the gate. Now with all the information available, you are supposed to tell, at any s原创 2020-08-19 02:00:16 · 95 阅读 · 0 评论 -
pat 甲级 排序 A1083 List Grades (25分)
1083 List Grades (25分)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 output those student records of which the grades are in a given interval.Input原创 2020-08-19 02:00:26 · 56 阅读 · 0 评论 -
pat 甲级 排序 A1080 Graduate Admission (30分)
1080 Graduate Admission (30分)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 you could write a program to automate the admission procedure.Each applica原创 2020-08-19 02:01:09 · 99 阅读 · 0 评论 -
pat 甲级 排序 A1062 Talent and Virtue (25分)
1062 Talent and Virtue (25分)About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his theory, a man being outstanding in both talent and virtue must be a "sage(圣人)"; b原创 2020-08-19 02:01:17 · 88 阅读 · 0 评论 -
pat 甲级 排序 A1055 The World‘s Richest (25分)
1055 The World's Richest (25分)Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to simulate this job, but concentrate only on the people in a certain range ...原创 2020-08-19 02:01:26 · 73 阅读 · 0 评论 -
pat 甲级 排序 A1025 PAT Ranking (25分)
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 the ranklists will be merged immediately after原创 2020-08-19 02:01:35 · 51 阅读 · 0 评论 -
pat 甲级 排序 A1016 Phone Bills (25分)
1016 Phone Bills (25分)A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of day when the call is made. When a customer starts connecting a原创 2020-08-19 02:01:42 · 57 阅读 · 0 评论 -
pat 甲级 排序 A1028 List Sorting (25分)
1028 List Sorting (25分)Excel can sort records according to any column. Now you are supposed to imitate this function.Input Specification:Each input file contains one test case. For each case, the first line contains two integers N (≤105) and C, wh原创 2020-08-20 15:56:00 · 61 阅读 · 0 评论 -
pat 甲级 排序 A1012 The Best Rank (25分)
1012 The Best Rank (25分)To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - English. At the mean time, we enc原创 2020-08-20 15:56:13 · 82 阅读 · 0 评论 -
pat 甲级 排序A1113 Integer Set Partition (25分)
1113 Integer Set Partition (25分)Given a set of N (>1) positive integers, you are supposed to partition them into two disjoint sets A1 and A2 of n1 and n2 numbers, respectively. Let S1 and S2 denote the sums of all the numbers in A1原创 2020-07-24 11:42:19 · 51 阅读 · 0 评论 -
pat 甲级 排序 A1075 PAT Judge (25分)(麻烦
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:Each input file contains one test case. For each cas原创 2020-08-20 15:56:50 · 52 阅读 · 0 评论 -
pat 甲级 排序 A1129 Recommendation System (25分)(!!
1129 Recommendation System (25分)Recommendation system predicts the preference that a user would give to an item. Now you are asked to program a very simple recommendation system that rates the user's preference by the number of times that an item has bee原创 2020-08-20 15:56:58 · 72 阅读 · 0 评论 -
pat 甲级 排序 A1153 Decode Registration Card of PAT (25分)
1153 Decode Registration Card of PAT (25分)A registration card number of PAT consists of 4 parts:the 1st letter represents the test level, namely, T for the top level, A for advance and B for basic; the 2nd - 4th digits are the test site number, ran...原创 2020-08-20 15:57:07 · 97 阅读 · 0 评论 -
pat 甲级 排序A1141 PAT Ranking of Institutions (25分)
1141 PAT Ranking of Institutions (25分)After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the ranklist.Input Specification:Each input file contains one test cas原创 2020-08-20 15:57:13 · 71 阅读 · 0 评论 -
pat 甲级 排序 A1117 Eddington Number (25分)
1117 Eddington Number (25分)British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum integer E such that it is for E days that one rides more th原创 2020-07-24 09:23:26 · 48 阅读 · 0 评论 -
pat 甲级 排序 A1089 Insert or Merge (25分)归并排序
1089 Insert or Merge (25分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input data, finds the location it belon原创 2020-07-21 17:00:27 · 98 阅读 · 0 评论 -
pat 甲级 排序 A1098 Insertion or Heap Sort (25分)堆排序 插入排序
1098 Insertion or Heap Sort (25分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input data, finds the locatio...原创 2020-07-21 16:30:32 · 57 阅读 · 0 评论 -
pat 甲级 排序 A1101 Quick Sort (25分)
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 moved to its left and those larger than the pivo原创 2020-07-21 15:12:58 · 62 阅读 · 0 评论