Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб. 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.
Для отправки решений необходимо выполнить вход.
|