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

一.技术总结 这里由于复杂度的限制,只能够使用vector,然后进行字符串转化:考虑到string.cin.cout会超时,可以使⽤用hash(262626*10+10)将学⽣生姓名变为int型,然后存储在vector里 这里出了一个巨大的问题,就是审题不清导致最后格式结果不正确. 还有就是空格输出问题,要注意前面是否已经有输出了. 还有就是字符串转化成int存储,hash列表的应用,空间换时间 int getID(char name[]){ int id = 0; for(int i = 0;…
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.…
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. Input Specification: Each input file…
题目 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. Input Specification: Each input fi…
题意: 输入两个正整数N和K(N<=40000,K<=2500),分别为学生和课程的数量.接下来输入K门课的信息,先输入每门课的ID再输入有多少学生选了这门课,接下来输入学生们的ID.最后N次询问,输入学生的ID输出该学生选了多少们课,输出所选课程的数量,按照递增序输出课程的ID. trick: 第5个数据点出现段错误,把原本以map存学生对应ID再映射vector存储该学生所选课程改成vector嵌套在map内,就没有段错误的问题出现,疑似映射过程中指针漂移??? AAAAAccepted…
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:…
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…