SP6695 BOPERISH - E - Publish of Perish
Description
**PROBLEM E**
**PUBLISH OF PERISH**
“Publish or perish” is the academic life’s fundamental motto. It refers to the fact that publishing your work frequently is the only way to guarantee access to research funds, bright students and career advances. But publishing is not enough. It is necessary that your work is _referenced_ (or _cited_). That is, your papers must be mentioned as source of information in other people’s publications, to attest the quality and relevance of your research. The more citations a paper receives from other authors, the more it is considered influential.
In 2005 Jorge E. Hirsch, a physicist at the University of California at San Diego, proposed a way to evaluate the scientific impact of a researcher, based on the citations his or her papers have received. The _h-index_, as Hirsch’s proposal became known, is a number based on the set of a researcher’s most cited papers. It is defined in Hirsch’s own words as: A scientist has index h if h of his N $ _{p} $ papers have at least h citations each, and the other (N $ _{p} $ − h) papers have at most h citations each.
Albert Einstein, for example, published 319 papers in scientific journals and has an h-index equal to 46. It means 46 of his papers have received 46 or more citations each, and all of his remaining 273 papers have 46 citations or less each. Given the information of how many citations each paper from a given researcher has received, write a program to calculate that researcher’s h-index.
**Input**
The input contains several test cases. The first line of a test case contains one integer N indicating the number of papers a researcher has published (1
Input Format
N/A
Output Format
N/A