cites[i] is how many times paper i has been cited.
The author's impact score is the largest number h such that the author has at least h papers, each cited at least h times.
Return the impact score.cites=[7, 2, 4, 9, 1, 4] → 4
Four papers have at least 4 citations each (7, 4, 9, 4), while only two have 5 or more. The answer is 4.
cites=[0, 0, 0] → 0
No paper has been cited, so the score is 0.
cites=[50] → 1
cites=[7, 2, 4, 9, 1, 4]
4
Run checks the first 3 tests in your browser. Submit checks all 81 tests on the server, hidden ones included.