H-Index
시간 제한: 1000ms메모리 제한: 512MB출처: ICPC Rocky Mountain Regional 2018BOJ 22282
문제
In research, it is tough to determine how good of a researcher you are. One way that people determine how good you are is by looking at your -Index.
Each paper has a certain number of citations. Your -Index is the largest number such that you have papers with at least citations. Given the number of citations on each paper you have written, what is your -Index?
입력
The first line of input contains a single integer (), which is the number of papers you have written.
The next lines describe the papers. Each of these lines contains a single integer (), which is the number of citations that this paper has.
출력
Display your -Index.
예제
예제 1
입력
5 7 1 2 1 5
출력
2
예제 2
입력
5 7 1 3 1 5
출력
3
예제 3
입력
3 4 2 3
출력
2
코드를 제출하려면 로그인하세요.