问题 B: Student List for Course (25)
时间限制: 1 Sec 内存限制: 64 MB
提交: 135 解决: 90
[提交][状态][讨论版][命题人:外部导入]
题目描述
Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course list of each student, you are supposed to output the student name lists of all the courses.
输入
Each input file contains one test case. For each case, the first line contains 2 numbers: N (<=40000), the total number of students, and K (<=2500), the total number of courses. Then N lines follow, each contains a student's name (3 capital English letters plus a one-digit number), a positive number C (<=20) which is the number of course