HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > IMPC-2014-15 Questions > problem:


Ind_03-10. 50743 - Total Scholarships Discount

IMPC-2014-15 Questions

Start: Nov.22.2014 at 03:00:00 PM
Finish: Nov.22.2014 at 08:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (1)

Contest problems

• 4th-6. 50536 - Epoka Furgon Shpk
• Ind_01-10. 50752 - Student Groups
• Ind_01-20. 50416 - Placing Domino...
• Ind_01-30. 50764 - Fast Typing Co...
• Ind_01-50. 50718 - Elevator
• Ind_02-10. 50497 - Falling Bricks - ...
• Ind_02-20. 50745 - Bitonic Sequence
• Ind_02-30. 50657 - Permutations an...
• Ind_03-10. 50743 - Total Schola...
• Ind_03-20. 50515 - Lines - Revisited
• Ind_03-40. 50777 - Dwarfs Maze
• Ind_03-50. 50679 - Jetpack Hurdle J...
• Ind_04-10. 50787 - Expected Value
• Ind_04-20. 50520 - Filling a Matrix ...
• Ind_04-30. 50658 - The Message

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
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. DateScoreScholarshipDiscount
40 2014-11-19 3226.200
162014-12-36116 1001000
34 2014-12-3549050 500
312015-1-16 6166.21001000
222015-2-1  5068.4   00
112015-3-2566675750
4 2015-3-12 5158.300
302015-3-14463700
7 2015-4-21503200
45 2015-5-29 5506500



Для отправки решений необходимо выполнить вход.

www.contester.ru