HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Data Structures > problem:


51015 - Student Scholarships

Guest
• Review clarifications (2)

Volume problems

• 51067 - Jumping frog
• 51080 - Deepest Point
• 51079 - Key person - 2
• 51021 - Number of Nodes
• 51044 - Number of Trees
• 51010 - Max Sequential Sum
• 51086 - Top popular student
• 51072 - Castle on chessboard
• 51015 - Student Scholarships
• 51082 - Sum is equal to K - 1
• 51020 - Number of nodes removed
• 51023 - Preparing Keyword Index
• 51075 - Shortest Path for Bishop
• 50774 - Hot Potato
• 50688 - Epoka Furgon
• 50750 - Service Time - 2
• 50771 - BST Level Sum

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