Gửi bài giải

Điểm: 1,00 (OI)
Giới hạn thời gian: 1.0s
Giới hạn bộ nhớ: 256M
Input: stdin
Output: stdout

Nguồn bài:
Ha Minh Ngoc
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch

The ABC School intends to award scholarships to students with rank from ~1~ to ~k~ according to the decreasing average score. Students with equal GPA have same rank. With the learning results of ~n~ students, please help Mr. A find out the list of students awarded scholarships.

Input

The first line contains the number of students (denoted by ~n~) and the number of scholarships ~k~ (~0~ ≤ ~k~ ≤ ~n~ ≤ ~10^{5}~).

In the next ~n~ lines, each line contains student information including student ID (10-digit integer), student name (including letters a through z and no more than ~20~ characters), the number of learned courses (denoted by ~p~) and ~p~ non-negative integers are the scores of ~p~ courses which is no more than 100.

Output

Output the list of students are awarded scholarships including student's rank, student's code, student's name and average score (rounded to the unit) in ascending order of rank, increasing student id.

Note that the GPA is only calculated on passed courses (the score must be at least 50)

Sample Input:

5 3
1131209131 phung 1 60
1131200010 phong 2 69 40
1131200002 vinh 3 80 70 75
1131200001 phuc 4 80 70 90 60
1131200003 phuoc 4 80 70 90 59

Sample Output:

1 1131200001 phuc 75
1 1131200002 vinh 75
3 1131200003 phuoc 75

Bình luận

Hãy đọc nội quy trước khi bình luận.


Không có bình luận tại thời điểm này.