HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Data Structures > problem:


51015 - Student Scholarships

Guest
• Review clarifications (2)

Volume problems

• 50816 - Largest Sum Path
• 50857 - Nine-Stones Game
• 50490 - Across the River
• 50837 - Sum is equal to K
• 51010 - Max Sequential Sum
• 50772 - The Path of a Node
• 50936 - Saving the Soldiers
• 51086 - Top popular student
• 51015 - Student Scholarships
• 50828 - Arranging Time Table
• 50447 - Swimming Contest - 2
• 51072 - Castle on chessboard
• 51082 - Sum is equal to K - 1
• 50794 - Writing Files Into HDD
• 51020 - Number of nodes removed
• 51023 - Preparing Keyword Index
• 50929 - Present from your uncles

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.

Student Scholarships

Question: University has processed the student applications and according to several criteria, scholarship for each student has been decided. The admission office takes the ids and the percentage of scholarships for n students. Later, m students ask about their scholarships. Show the number of students who have 75% or more scholarships among the m students.

Input specification: You will be given two numbers n and m. Then the following n lines will have ids and scholarship amounts of n students. The following m lines will have the ids of m students where 1 ≤ m < n ≤ 5e4, ids are integers between 1 and 1e8 and scholarship percentages are integers between 0 and 100.

Output specification: Show one integer.

Sample Input
6 3
11 0
2 80
6 30
4 0
7 0
10 90
2
4
10
Sample Output
2

Explanation: There are 6 students and 3 of them have asked about their results. Student with the ID 4, has no scholarship. Student with the ID 2, has 80% scholarship, and Student with the ID 10, has 90% scholarship. So, there are 2 students who has 75% or more scholarship.



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

www.contester.ru