Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

EISTULI - Top highest GPA

 

Given a list of n students with the following information
Student ID (a 10-digit integer).
Student name (including lowercase letters, no spaces, no more than 20 characters).
Number of subjects (integer, not more than 100).
Highest score of all subjects (non-negative integer and not more than 100).
Accordingly, the average score is calculated on subjects with scores of not less than 50. Each subject is equivalent to 4 credits.
Output a list of no more than k students with the highest GPA.

Given a list of n students with the following information

  • Student ID (a 10-digit integer).
  • Student name (including lowercase letters, no spaces, no more than 20 characters).
  • Number of courses(integer, no more than 100).
  • Highest score of all courses(non-negative integer and no more than 100).

Accordingly, the average score is calculated on courses with scores of not less than 50. Each course is equivalent to 4 credits.

Output a list of no more than k students with the highest GPA.

 

Input:

The first line is the number of students n (0 < n ≤ 105) and the integer k (0 < k ≤ n).

Each line in the next n lines contains information about a student, student id, name, course number, and course grades.

Output:

Output the list as required, per student per line of student ID, name, GPA rounded to units, and number of credits. The list of students appears in descending order of grades (unrounded score), if the scores are equal, then students should be in the order entered. If two students have the same score, they should be both outputed or none of them is outputed.

Example

Input

Output

3 2

1131209131 phung 4 100 90 80 60

1131200010 phong 3 60 50 40

1131200001 vinh 4 50 60 60 50

1131209131 phung 83 16

 

 

 


Added by:Ha Minh Ngoc
Date:2018-03-17
Time limit:1s-1.299s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.