109842024-04-27 22:37:3042Hús sütés (75 pont)python3Accepted 75/75108ms42168 KiB
from sys import stdin
input=stdin.readline

def main():
    N=int(input())
    A=list(map(int,input().split()))
    A.sort(reverse=True)
    res=-1
    for i in range(N):
        res=max(res,A[i]+i)
    print(res)
    return

main()
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/017ms10832 KiB
2Accepted0/017ms11540 KiB
3Accepted0/059ms23504 KiB
4Accepted3/317ms12080 KiB
5Accepted3/317ms12364 KiB
6Accepted3/317ms12140 KiB
7Accepted3/317ms12252 KiB
8Accepted4/417ms12300 KiB
9Accepted4/417ms12184 KiB
10Accepted4/417ms12528 KiB
11Accepted4/417ms12612 KiB
12Accepted4/417ms12588 KiB
13Accepted4/4108ms35236 KiB
14Accepted4/4108ms36368 KiB
15Accepted5/5104ms37132 KiB
16Accepted5/5108ms38092 KiB
17Accepted5/5105ms38744 KiB
18Accepted4/4104ms39528 KiB
19Accepted4/4108ms40108 KiB
20Accepted4/479ms40724 KiB
21Accepted4/498ms40308 KiB
22Accepted2/2103ms42168 KiB
23Accepted2/264ms24184 KiB