ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Турниры > CEN112 Questions 2016 > задача:


15-MdtE-5. 50912 - Trip to Librazhd

CEN112 Questions 2016

Старт: 30.мар.2016 в 15:10:22
Финиш: 01.апр.2016 в 05:00:00
Турнир завершён!
• Турнирная таблица

Гость
• Вопросы к жюри (1)

Задачи турнира

• 15-HW-2. 50932 - Shifting rows and...
• 15-HW-3. 50933 - Sum of the Bigges...
• 15-HW-4. 50934 - Selling Cars
• 15-HW-5. 50935 - Max Discount
• 15-MdtE-1. 50915 - Trip to Korca
• 15-MdtE-2. 50916 - Ascending Num...
• 15-MdtE-3. 50913 - Manhattan Distance
• 15-MdtE-4. 50917 - Descending Nu...
• 15-MdtE-5. 50912 - Trip to Libra...
• 15-MdtE-6. 50914 - Buy 3, Pay 2
• 15-PE-1. 50865 - Apartment Building...
• 15-PE-2. 50866 - Buy the cheapest
• 15-PE-4. 50868 - Sort Frequencies
• 15-PE-5. 50869 - Birthday Celebration
• 15-PE-7. 50871 - Harmonic Mean
• 15-PE-8. 50872 - Top M Grades
• 15-PE2-1. 50980 - The smallest rect...

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Sidrit Reka and Ibrahim Mesecan.

Trip to Librazhd

Question: University is organizing a trip to Librazhd. You have the students list. And, you will be given m student IDs who are not participating to the trip. After the removal of given students, show sorted list in ascending order according to grade attending and names (and surnames).

Input specification
You will be given two integers in the beginning: the number of students (n) and the number students (m) who are not participating to the activity. In the following n lines, you will be given n student information:

  • Student ID: an integer not greater than 100,000
  • Name and surname: at most 15 chars strings (separated by a space)
  • Grade attending: an integer between 1 and 5
  • Gender: a single char 'f' or 'm'
The last line contains m integers: the IDs of the students who are not participating to the trip. where 0 ≤ m ≤ n ≤ 40,000

Output specification:
Show grade, name & surname of the students who are participating (in the order given above).

Sample Input I
10 5
4 Dominic Allison 1 m
7 Moses Mendez 4 m
9 Alison Burns 3 f
13 Marilyn Patterson 3 f
18 Jean Bass 4 m
20 Cora Duncan 3 f
24 Marta Roberson 3 f
25 Jill Flores 1 f
28 Carla Holmes 2 f
32 Mike Johnston 1 m
20 7 32 13 9
Sample Output I
1 Dominic Allison
1 Jill Flores
2 Carla Holmes
3 Marta Roberson
4 Jean Bass



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

www.contester.ru