Submission #851581

#TimeUsernameProblemLanguageResultExecution timeMemory
851581Aplace이상한 수열 (OJUZ10_bizarre)Pypy 2
0 / 100
43 ms30544 KiB
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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...