HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > IMPC16 Group Contests > problem:


32. 50926 - School Mail Merge

IMPC16 Group Contests

Start: Jan.16.2016 at 10:00:00 AM
Finish: Jan.16.2016 at 02:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (2)

Contest problems

• 13. 50861 - The largest Student Group
• 14. 50862 - Sum of the Pairs
• 15. 50863 - Total Access Cost of a BST
• 21. 50873 - Max Frequency
• 22. 50874 - Apartment Building Adm...
• 23. 50875 - Take m-out
• 24. 50876 - He is my cousin
• 25. 50877 - Friendly Queue
• 32. 50926 - School Mail Merge
• 33. 50927 - Health Expenses
• 34. 50928 - War Of Battleships
• 35. 50929 - Present from your uncles
• F1. 50841 - My grand-grand-grandfa...
• F2. 50936 - Saving the Soldiers
• F4. 50977 - Gaussian Elimination
• F5. 50978 - Albanian Coders
• F6. 50979 - Minimum access cost for...

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.

School Mail Merge

The director of the school that you have graduated from heard that you study at Computer engineering. He wants a special program to send messages to students.

Question:
You will be given a list of students with their personal information and information about their courses. Then you will be given another text in which there are special tags to be replaced by the information of the selected student.

Input specification
You will be given an integer (n) the number of students where 0 ≤ n ≤ 1,000. The following n lines contain information for n students:

  • Student ID: an integer not greater than 100,000
  • Name and surname: at most 15 chars strings (separated by a space)
  • Class: 5 char string containing letters and digits
  • Gender: a single char 'f' or 'm'
  • Grades: 5 integers for 5 courses (Language, Math, Computer, Art, Music)
Then you will be given the ID of the student for whom the mail will be prepared. At the end of input, you will be given a text of unknown length for the mail merge. In the text, you can have #keywords with (#) before. The keywords may be followed by a space ' ', a period '.', a comma ',', an exclamation mark '!', or an end of line character. Here, is the list of keywords:
  ID, name, surname, class, child, language, math, computer, art, music
where child will be replaced with son or daughter and the first grade is language, the second grade is math, etc.

Output specification:
Show the message customized for the given student.

Sample Input I
3
223 Andi Gjoba 10B m 75 56 88 93 67
541 Klevin Zyka 10C m 54 88 85 93 67
476 Stacey Stevenson 11A f 94 75 88 67 69
476
Dear Parent
Your #child #name #surname
from #class did not come to school today.

Best wishes
Sample Output I
Dear Parent
Your daughter Stacey Stevenson from
11A did not come to school today.
Best wishes

Note: You can print the text in one or multiple lines. But the text must be exactly as it is (uppercase or lowercase).



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

www.contester.ru