# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
851582 |
2023-09-20T07:38:14 Z |
Aplace |
이상한 수열 (OJUZ10_bizarre) |
PyPy 3 |
|
45 ms |
27088 KB |
N = int(input())
L_S = list(map(int, input().split()))
M = int(input())
if M <= len(L_S):
print(L_S[M - 1])
else:
S = list(set(L_S))
diff = len(S)
if diff in S:
print(diff)
else:
S.append(0x7FFFFFFF) # Max
S.append(diff) # Now
S.sort()
inserted = S.index(diff) # N+1
End = S[inserted + 1]
print(min(M - (N + 1 - diff), End))
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
26 ms |
18236 KB |
Output is correct |
2 |
Correct |
27 ms |
18228 KB |
Output is correct |
3 |
Correct |
26 ms |
18192 KB |
Output is correct |
4 |
Correct |
26 ms |
18276 KB |
Output is correct |
5 |
Correct |
26 ms |
18260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
26 ms |
18168 KB |
Output is correct |
2 |
Correct |
25 ms |
18212 KB |
Output is correct |
3 |
Correct |
25 ms |
18236 KB |
Output is correct |
4 |
Correct |
28 ms |
18228 KB |
Output is correct |
5 |
Correct |
26 ms |
18236 KB |
Output is correct |
6 |
Correct |
26 ms |
18228 KB |
Output is correct |
7 |
Correct |
25 ms |
18208 KB |
Output is correct |
8 |
Correct |
26 ms |
18228 KB |
Output is correct |
9 |
Correct |
26 ms |
18236 KB |
Output is correct |
10 |
Correct |
27 ms |
18452 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
32 ms |
20280 KB |
Output is correct |
2 |
Correct |
33 ms |
23844 KB |
Output is correct |
3 |
Correct |
33 ms |
24120 KB |
Output is correct |
4 |
Correct |
33 ms |
22536 KB |
Output is correct |
5 |
Correct |
30 ms |
19248 KB |
Output is correct |
6 |
Correct |
29 ms |
19504 KB |
Output is correct |
7 |
Correct |
35 ms |
24620 KB |
Output is correct |
8 |
Correct |
38 ms |
25084 KB |
Output is correct |
9 |
Correct |
30 ms |
20016 KB |
Output is correct |
10 |
Correct |
35 ms |
24880 KB |
Output is correct |
11 |
Correct |
36 ms |
24872 KB |
Output is correct |
12 |
Correct |
30 ms |
21048 KB |
Output is correct |
13 |
Correct |
32 ms |
23084 KB |
Output is correct |
14 |
Correct |
39 ms |
26152 KB |
Output is correct |
15 |
Correct |
34 ms |
24688 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
31 ms |
21040 KB |
Output is correct |
2 |
Correct |
33 ms |
22840 KB |
Output is correct |
3 |
Correct |
30 ms |
20028 KB |
Output is correct |
4 |
Correct |
39 ms |
25904 KB |
Output is correct |
5 |
Correct |
36 ms |
24764 KB |
Output is correct |
6 |
Correct |
43 ms |
27068 KB |
Output is correct |
7 |
Correct |
33 ms |
24364 KB |
Output is correct |
8 |
Correct |
29 ms |
19244 KB |
Output is correct |
9 |
Correct |
30 ms |
22544 KB |
Output is correct |
10 |
Correct |
29 ms |
19712 KB |
Output is correct |
11 |
Correct |
25 ms |
18236 KB |
Output is correct |
12 |
Correct |
33 ms |
23864 KB |
Output is correct |
13 |
Correct |
42 ms |
26240 KB |
Output is correct |
14 |
Correct |
45 ms |
27088 KB |
Output is correct |
15 |
Correct |
34 ms |
24112 KB |
Output is correct |