A1047 Student List for Course (25 分)】的更多相关文章

一.技术总结 首先题目要看清湖,提出的条件很关键,比如for循环的终止条件,特别注意. 还有这个题目主要考虑到vector的使用,还有注意一定要加上using namespace std; 输出格式,题目中如果没有要求什么最后一行不能有空格什么的,就不要画蛇添足,按照正常的换行就行. 这里采用的是先使用二维字符串数组存储名字,然后名字也有编号,使用这个编号来记录每个课程中选取的学生,巧妙的避免了要记录下字符串的尴尬局面.然后再开辟一个vector容器来记录课程中选课学生的编号,最后排序即可. 如…
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 courses. Input Specification:…
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. Input Specification: Each input file contains one test cas…
题意: 输入两个正整数N和K(N<=40000,K<=2500),接下来输入N行,每行包括一个学生的名字和所选课程的门数,接着输入每门所选课程的序号.输出每门课程有多少学生选择并按字典序输出学生的名字. AAAAAccepted code: #define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; ]; vector<]; int main(){ ios::sync_with_stdio…
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 course list for each student who comes for a query.…
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. I…
1109 Group Photo (25 分) Formation is very important when taking a group photo. Given the rules of forming K rows with N people as the following: The number of people in each row must be N/K (round down to the nearest integer), with all the extra peop…
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, w…
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 one test case. Each case contai…
A1083 List Grades (25)(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 interv…