n=int(input())
p=0
L=list(map(int,input().split()))
i=0
while 1:
i+=1
m=0
for j in range(n):
if L[j]>=i:
m+=1
if m==i:
p=i
break
if p<i:
print(p)
break
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
3300 KB |
Output is correct |
2 |
Correct |
27 ms |
3300 KB |
Output is correct |
3 |
Correct |
26 ms |
3300 KB |
Output is correct |
4 |
Correct |
26 ms |
3300 KB |
Output is correct |
5 |
Correct |
26 ms |
3300 KB |
Output is correct |
6 |
Correct |
102 ms |
3404 KB |
Output is correct |
7 |
Execution timed out |
1074 ms |
4428 KB |
Time limit exceeded |
8 |
Execution timed out |
1068 ms |
14944 KB |
Time limit exceeded |
9 |
Execution timed out |
1079 ms |
60448 KB |
Time limit exceeded |
10 |
Execution timed out |
1065 ms |
32600 KB |
Time limit exceeded |