IMPC-2014-15 Questions |
Старт: 22.ноя.2014 в 15:00:00
Финиш: 22.ноя.2014 в 20:00:00
Турнир завершён!
• Турнирная таблица
|
|
Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб. Question by Ibrahim Mesecan.
Total Scholarships Discount
The university provides scholarship for the first three
thousand students according to their graduation exam
scores and registration dates. A student can grant
- 100% scholarship, if she/he is among the first 1000 students
- 75% scholarship, if she/he is among the second 1000 students
- 50% scholarship, if she/he is among the third 1000 students
The list of the students who got scholarship is announced after
the graduation exams according to their application dates.
The student who applies first has priority before the other
students if (s)he gets a score among the first 3000. If
two students have applied on the same day, the student
with the smaller id is before the other. The university
announces the score limits after the graduation exams.
Three floating point numbers. The students who have score
above the first number are the students in the
first 1000, etc.
Question:
Write a program that reads student application information,
then figures out the total amount of scholarships
provided to the top k students.
Input specification
In the beginning, you will be given two integers:
total number of students (n) the school fee (f) and the number
of students who can get scholarships (k) where
5 ≤ n ≤ 50,000, 5 ≤ f ≤ 10,000 and
1 ≤ k ≤ 1,000. In the second line you are given three
floating point numbers. The limit for the first 1000, the
limit for the second 1000, etc. Then in the following n
lines you will be given information for n students. Every
line contains the following information:
- Student ID: an integer between 1 and 1e8
- Registration date: 3 integers - year, month and day
- Student score: a floating point number between 1 and 10,000
Output specification
Show the total amount of scholarships provided
to all k students with 2 digits precision.
Sample Input I
10 1000 4
5872 5578 5284.2
4 2015 3 12 5158.3
7 2015 4 21 5032
11 2015 3 2 5666
16 2014 12 3 6116
22 2015 2 1 5068.4
30 2015 3 14 4637
31 2015 1 16 6166.2
34 2014 12 3 5490
40 2014 11 19 3226.2
45 2015 5 29 5506
|
Sample Output I
3250
|
Explanation:
The student with the ID 45 deserved to take scholarship but he
couldn’t receive, because top k (4) students can take scholarship.
The student with the ID 40 has registered first but he cannot
take scholarship because his score is low.
ID | Reg. Date | Score | Scholarship | Discount |
40 | 2014-11-19 | 3226.2 | 0 | 0 |
16 | 2014-12-3 | 6116 | 100 | 1000 |
34 | 2014-12-3 | 5490 | 50 | 500 |
31 | 2015-1-16 | 6166.2 | 100 | 1000 |
22 | 2015-2-1 | 5068.4 | 0 | 0 |
11 | 2015-3-2 | 5666 | 75 | 750 |
4 | 2015-3-12 | 5158.3 | 0 | 0 |
30 | 2015-3-14 | 4637 | 0 | 0 |
7 | 2015-4-21 | 5032 | 0 | 0 |
45 | 2015-5-29 | 5506 | 50 | 0 |
Для отправки решений необходимо выполнить вход.
|