Write an algorithm to identify the youngest person and the oldest person in a class.
Input
The number n (1 ≤ n ≤ 100) in the first line determines the number of
people in a class. The following n lines contain a person’s name and
his/her birthdate.
The information in each line is of this format:
personName dd mm yyyy
where personName is a single word less than 15 letters, dd mm yyyy are
date, month, and year of the birth date.
Suppose that no one has the same name or the same birthdate.
Output
Print out 2 lines containing the name of the youngest person and oldest
person, respectively.
Sample Input
5
Mickey 1 10 1991
Alice 30 12 1990
Tom 15 8 1993
Jerry 18 9 1990
Garfield 20 9 1990
Sample Output
Tom
Jerry
Answers
Answered by
0
Answer:
rewrite the question I'm not understanding your questions
Similar questions
Math,
2 days ago
Science,
2 days ago
Math,
4 days ago
Math,
4 days ago
Computer Science,
8 months ago
Social Sciences,
8 months ago
English,
8 months ago