21665_Publishorperis

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

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

Pro.ID

21665

Title

Publish or perish

Title链接

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

AC

2

Submit

19

Ratio

10.53%

时间&空间限制

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

    Paper quality and quantity have long been used to measure a research's scientific productivity and scientific impact. Citation, which is the total times a paper has been cited, is a common means to judge importance of a paper. However, with all these factors varying, a collegiate committee has problems when judging which research is doing better. For this reason, H-index is proposed and now widely used to combine the above factors and give accurate judgment. H-index is defined as:

    A scientist has index h if h of [his] Np papers have at least h citations each, and the other (Np - h) papers have at most h citations each.

    In other words, a scholar with an index of h has published h papers each of which has been cited by others at least h times. Note that H-index is always an integer. It's said that achieving H-index of 18 means one is fully qualify to be a professor, and H-index of 45 or higher could mean membership in the United States National Academy of Sciences.

    You are to calculate the H-index for all the researches in the list, base on the given information.

    输入

    There are multiple scenarios in the input, terminated by a single zero (0).

    Each of the scenarios begin with an integer N ( 1 ≤ N ≤ 100 ), means that there are N papers. N lines follow, each contain a string (not exceeding 20 characters long), representing the author of the corresponding paper, without white spaces in-between. Though it would be common for one paper written by several authors, there would be exactly one author of each of these papers. Finally, there are N lines of strings, containing '0's and '1's. If the j-th character in the i-th line is '1' it means the i-th paper cites the j-th paper. A paper could never cite itself.

    输出

    Description

    Paper quality and quantity have long been used to measure a research's scientific productivity and scientific impact. Citation, which is the total times a paper has been cited, is a common means to judge importance of a paper. However, with all these factors varying, a collegiate committee has problems when judging which research is doing better. For this reason, H-index is proposed and now widely used to combine the above factors and give accurate judgment. H-index is defined as:

    A scientist has index h if h of [his] Np papers have at least h citations each, and the other (Np - h) papers have at most h citations each.

    In other words, a scholar with an index of h has published h papers each of which has been cited by others at least h times. Note that H-index is always an integer. It's said that achieving H-index of 18 means one is fully qualify to be a professor, and H-index of 45 or higher could mean membership in the United States National Academy of Sciences.

    You are to calculate the H-index for all the researches in the list, base on the given information.

    Input

    There are multiple scenarios in the input, terminated by a single zero (0).

    Each of the scenarios begin with an integer N ( 1 ≤ N ≤ 100 ), means that there are N papers. N lines follow, each contain a string (not exceeding 20 characters long), representing the author of the corresponding paper, without white spaces in-between. Though it would be common for one paper written by several authors, there would be exactly one author of each of these papers. Finally, there are N lines of strings, containing '0's and '1's. If the j-th character in the i-th line is '1' it means the i-th paper cites the j-th paper. A paper could never cite itself.

    Output

    For each scenario, output as many lines as the number of authors given. Each line contains the author's name and his H-index. The list should be sorted first by H-index in descending order, than by name in alphabetic order (Actually, ASCII order. So 'B' is prior to 'a').

    Output a blank line after each scenario.

    Sample Input

    4
    Peter
    Peter
    Bob
    Bob
    0000
    1000
    1100
    0100
    0

    Sample Output

    Peter 2

    Bob 0

    Source

    样例输入

    4
    Peter
    Peter
    Bob
    Bob
    0000
    1000
    1100
    0100
    0

    样例输出

    Peter 2

    Bob 0

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部