Home > Back-end >  birthday
birthday

Time:05-16

[title description]
Xiao Ming has n friends birthday information, would you please help him to determine, who will and xiao Ming's birthday on the same day,
Input [description]
The input file name: bd. In
The first act of the current date format such as: 2021-4-5, the date format must be legal and the minimalist,
The second act a positive integer n (0 & lt; N & lt; 6), said he has n schoolmate's birthday information,
Starting from the third row of n lines, each line contains two information, one is the names of the students (including Spaces); Another is the birthday of the students with the current date (format)
[description] output
Output filename: bd out
Output all the names and xiao Ming day birthday, with input output sequence order, each name a line, if there is no and xiao Ming day birthday, output "only Ming", "
[the input sample 1]
The 2021-4-5
4
Fu 1991-3-1
Yu 1990-4-5
Li, the 2001-4-7
Zhang, the 1989-4-5
[output sample 1)
Yu
Zhang
[input sample 2]
The 1990-3-1
1
Tao 1976-2-29
[output sample 2]
Only Ming

Other descriptions []
Year must be 4 digits