C. 【2016-2017#6】 序列最大值

    Type: Default 1000ms 256MiB

【2016-2017#6】 序列最大值

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

给出一个数列,请你求出一个最大的整数 HH,使原数列中至少有 HH 个数 H\ge H

Input Format

第一行,一个正整数 NN,表示数列中数的个数;

第二行,NN 个整数 AiA_i,表示数列中的数。

Output Format

一行,一个整数 HH,表示符合条件的最小整数。

5
1 1 4 8 1 
2
5
8 5 3 4 10
4

Hint

提示

【样例解释 #1】

22 大的数有 22 个,分别是 4488

【样例解释 #2】

44 大的数有 44 个,分别是 8855441010

【数据范围】

对于 100%100\% 的数据,1N5×1051\le N\le 5\times 10^50Ai1×1060\le A_i\le 1\times 10^6

Source

[COCI2016-2017#6] Hindeks

2025ACM暑假练习题

Not Attended
Status
Done
Rule
XCPC
Problem
7
Start at
2025-7-1 14:00
End at
2025-7-1 17:00
Duration
3 hour(s)
Host
Partic.
28