# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
30864 |
2017-07-28T20:17:25 Z |
leejseo |
이상한 수열 (OJUZ10_bizarre) |
Python 2 |
|
285 ms |
3 KB |
def main():
n = int(raw_input())
s = map(int, raw_input().split())
m = int(raw_input())
s.sort()
if m <= n:
print s[m-1]
return
L = []
for i in range(n):
if s[i] not in L:
L.append(s[i])
c = len(L)
index = n
for i in range(n):
if c <= s[i]:
index = i
if index == n:
print c + m-(n+1)
return
diff = s[index] - c
if m - (n+1) > diff:
print s[index]
return
print c + m-(n+1)
return
main()
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
2 KB |
Output is correct |
2 |
Halted |
0 ms |
0 KB |
- |
3 |
Incorrect |
18 ms |
2 KB |
Output isn't correct |
4 |
Correct |
12 ms |
2 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |
2 |
Incorrect |
15 ms |
2 KB |
Output isn't correct |
3 |
Correct |
15 ms |
2 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
285 ms |
3 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |
2 |
Incorrect |
268 ms |
3 KB |
Output isn't correct |