RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
USACO0476

Acowdemia

Gold II 골드 II
난이도
2s
시간 제한
256MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

Bessie the cow has enrolled in a computer science PhD program, driven by her
love of computer science and also the allure of one day becoming "Dr. Bessie".
Having worked for some time on her academic research, she has now published \(N\)
papers (\(1 \leq N \leq 10^5\)), and her \(i\)-th paper has accumulated \(c_i\)
citations (\(0 \leq c_i \leq 10^5\)) from other papers in the research literature.

Bessie has heard that an academic's success can be measured by their \(h\)-index.
The \(h\)-index is the largest number \(h\) such that the researcher has at least
\(h\) papers each with at least \(h\) citations. For example, a researcher with \(4\)
papers and respective citation counts \((1,100,2,3)\) has an \(h\)-index of \(2\),
whereas if the citation counts were \((1,100,3,3)\) then the \(h\)-index would be
\(3\).

To up her \(h\)-index, Bessie is planning to write up to \(K\) survey articles
(\(0 \leq K \leq 10^5\)), each citing many of her past papers. However, due to
page limits, she can only cite at most \(L\) papers in each survey
(\(0 \leq L \leq 10^5\)). Of course, no paper may be cited multiple times in a
single survey (but a paper may be cited in several surveys).

Help Bessie determine the maximum \(h\)-index she may achieve after writing these
survey articles. Bessie is not allowed to cite a survey from one of her surveys.

Note that Bessie's research advisor should probably inform her at some point
that writing a survey solely to increase one's \(h\) index is ethically dubious;
other academics are not recommended to follow Bessie's example here.

Problem credits: Dhruv Rohatgi

제약

SCORING

  • Test cases 1-6 satisfy \(N\le 100\).
  • Test cases 7-16 satisfy no additional constraints.

Problem credits: Dhruv Rohatgi

입력 형식

The first line contains \(N\), \(K\), and \(L\).

The second line contains \(N\) space-separated integers \(c_1,\ldots, c_N\).

출력 형식

The maximum \(h\)-index on a single line.

예제 1
입력
4 4 1
1 100 1 1
출력
3
설명

In this example, Bessie may write up to \(4\) survey articles, each citing at most \(1\) paper.
If she cites each of her first and third articles twice, then her \(h\)-index
becomes
\(3\).

예제 2
입력
4 1 4
1 100 1 1
출력
2
설명

In this second example, Bessie may write at most a single article. If Bessie cites any
of her first, third, or fourth papers at least once, her \(h\)-index becomes \(2\).

문제 정보

riseoj 작성

출처 올림피아드 > USACO > 2020-2021 > US Open > Silver

태그

평가 및 의견

Acowdemia

개요
출제자 난이도 Gold II 골드 II 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

Acowdemia

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8