22110_AcademyAwards

2022-5-16 18:21| 发布者: Hocassian| 查看: 28| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-5-89506116801500-Problem List-采集的数据-后羿采集器.html

Pro.ID

22110

Title

Academy Awards

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=22110

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    Selected from 3,850 teams from 1,329 universities in 68 countries competing at 106 sites and preliminary contests worldwide, sixty-eight teams competed for bragging rights and prizes at The 27th Annual ACM International Collegiate Programming Contest World Finals sponsored by IBM on March 25, 2003, in Hollywood, California. The 2003 World Champion is Warsaw University. And Zhongshan University won the 8th place. During those days, another world famous event was held in the same place. It was the 75th Annual Academy Awards. It's also known as Oscar.

    We always say that the Best Picture is the most important award of all the awards. Before the Oscar Night, we can't tell which film will win Best Picture. Fortunately, we can dope it out from the Nominee List of all the awards other than the Best Picture. I suggest that you should follow my 3 rules here.

    • All the films in the list have chances to win the Best Picture

    • The film which will win the Best Picture is the film which has been nominated the most tunes in the list

    • If there are more than one film which have been nominated the most times in the list, we will choose the first one which appears in the list

    Let's see such a List below.

    VISUAL EFFECTS

    THE LORD OF THE RINGS: THE TWO TOWERS

    SPIDER-MAN

    STAR WARS EPISODE II ATTACK OF THE CLONES

    SOUND EDITING

    THE LORD OF THE RINGS: THE TWO TOWERS

    MINORITY REPORT

    ROAD TO PERDITION

    From the list, we can find that THE LORD OF THE RINGS: THE TWO TOWERS has been nominated twice. And each of the other films has been nominated only once. So we can say THE LORD OF THE RINGS: THE TWO TOWERS will win the Best Picture.

    Your task is to write a program to figure out the anticipatory winner from the list.

    输入

    The input file will consist of several lists. The first line of each list contains only one integer n (1 ≤ n ≤ 100), representing the number of awards in the list. Then you get n blocks. Each block indicated the nominees of a distinct award. The first line of each block is the name of the award which is not longer than 80. The second line is mi (1 ≤ mi ≤ 10, 1 ≤ in) -- the number of nominated films. In the following lines are mi film names, one per line. For make the question simple, you can assume that there isn't any space in the film names.

    The input is terminated by a line with one zero.

    输出

    Description

    Selected from 3,850 teams from 1,329 universities in 68 countries competing at 106 sites and preliminary contests worldwide, sixty-eight teams competed for bragging rights and prizes at The 27th Annual ACM International Collegiate Programming Contest World Finals sponsored by IBM on March 25, 2003, in Hollywood, California. The 2003 World Champion is Warsaw University. And Zhongshan University won the 8th place. During those days, another world famous event was held in the same place. It was the 75th Annual Academy Awards. It's also known as Oscar.

    We always say that the Best Picture is the most important award of all the awards. Before the Oscar Night, we can't tell which film will win Best Picture. Fortunately, we can dope it out from the Nominee List of all the awards other than the Best Picture. I suggest that you should follow my 3 rules here.

    • All the films in the list have chances to win the Best Picture

    • The film which will win the Best Picture is the film which has been nominated the most tunes in the list

    • If there are more than one film which have been nominated the most times in the list, we will choose the first one which appears in the list

    Let's see such a List below.

    VISUAL EFFECTS

    THE LORD OF THE RINGS: THE TWO TOWERS

    SPIDER-MAN

    STAR WARS EPISODE II ATTACK OF THE CLONES

    SOUND EDITING

    THE LORD OF THE RINGS: THE TWO TOWERS

    MINORITY REPORT

    ROAD TO PERDITION

    From the list, we can find that THE LORD OF THE RINGS: THE TWO TOWERS has been nominated twice. And each of the other films has been nominated only once. So we can say THE LORD OF THE RINGS: THE TWO TOWERS will win the Best Picture.

    Your task is to write a program to figure out the anticipatory winner from the list.

    Input

    The input file will consist of several lists. The first line of each list contains only one integer n (1 ≤ n ≤ 100), representing the number of awards in the list. Then you get n blocks. Each block indicated the nominees of a distinct award. The first line of each block is the name of the award which is not longer than 80. The second line is mi (1 ≤ mi ≤ 10, 1 ≤ in) -- the number of nominated films. In the following lines are mi film names, one per line. For make the question simple, you can assume that there isn't any space in the film names.

    The input is terminated by a line with one zero.

    Output

    For each list, you are supposed to figure out the winner of Best Picture in a single line.

    Sample Input

    2
    VISUAL_EFFECTS
    3
    THE_LORD_OF_THE_RINGS:_THE_TWO_TOWERS
    SPIDER-MAN
    STAR_WARS_EPISODE_II_ATTACK_OF_THE_CL0NES
    SOUND_EDITING
    3
    THE_LORD_OF_THE_RINGS:_THE_TWO_TOWERS
    MINORITY_REPORT
    ROAD_TO_PERDITION
    0

    Sample Output

    THE_LORD_OF_THE_RINGS:_THE_TWO_TOWERS

    Source

    样例输入

    2
    VISUAL_EFFECTS
    3
    THE_LORD_OF_THE_RINGS:_THE_TWO_TOWERS
    SPIDER-MAN
    STAR_WARS_EPISODE_II_ATTACK_OF_THE_CL0NES
    SOUND_EDITING
    3
    THE_LORD_OF_THE_RINGS:_THE_TWO_TOWERS
    MINORITY_REPORT
    ROAD_TO_PERDITION
    0

    样例输出

    THE_LORD_OF_THE_RINGS:_THE_TWO_TOWERS

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部