結果

問題 No.2126 MEX Game
ユーザー rlangevinrlangevin
提出日時 2023-01-26 12:32:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 254 bytes
コンパイル時間 489 ms
コンパイル使用メモリ 86,896 KB
実行使用メモリ 91,216 KB
最終ジャッジ日時 2023-09-09 14:57:20
合計ジャッジ時間 5,156 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,888 KB
testcase_01 AC 77 ms
72,096 KB
testcase_02 AC 73 ms
72,092 KB
testcase_03 AC 78 ms
72,076 KB
testcase_04 AC 74 ms
72,056 KB
testcase_05 AC 72 ms
71,808 KB
testcase_06 AC 72 ms
72,212 KB
testcase_07 WA -
testcase_08 AC 72 ms
72,216 KB
testcase_09 AC 73 ms
72,020 KB
testcase_10 AC 96 ms
90,764 KB
testcase_11 AC 97 ms
90,740 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 95 ms
90,588 KB
testcase_16 AC 96 ms
90,652 KB
testcase_17 AC 98 ms
90,564 KB
testcase_18 AC 96 ms
90,608 KB
testcase_19 AC 95 ms
89,816 KB
testcase_20 AC 92 ms
89,760 KB
testcase_21 WA -
testcase_22 AC 75 ms
72,216 KB
testcase_23 AC 74 ms
72,004 KB
testcase_24 AC 75 ms
71,964 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 74 ms
71,928 KB
testcase_28 AC 74 ms
72,128 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
M = 101010
D = [0] * M
for a in A:
    D[a] += 1

ans = 0
for i in range(M):
    if D[i] >= 2 or (D[i] >= 1 and N - D[i] >= 1):
        ans = i + 1
        N -= D[i]
    else:
        break
print(ans) 
0