結果

問題 No.2126 MEX Game
ユーザー rlangevinrlangevin
提出日時 2023-01-26 12:36:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 262 bytes
コンパイル時間 503 ms
コンパイル使用メモリ 87,284 KB
実行使用メモリ 91,232 KB
最終ジャッジ日時 2023-09-09 14:59:30
合計ジャッジ時間 4,091 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
72,324 KB
testcase_01 AC 66 ms
71,932 KB
testcase_02 AC 66 ms
72,144 KB
testcase_03 AC 65 ms
72,120 KB
testcase_04 AC 63 ms
72,208 KB
testcase_05 AC 64 ms
71,944 KB
testcase_06 AC 66 ms
72,260 KB
testcase_07 AC 64 ms
72,132 KB
testcase_08 AC 64 ms
72,424 KB
testcase_09 AC 65 ms
72,100 KB
testcase_10 AC 88 ms
90,908 KB
testcase_11 AC 87 ms
91,232 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 86 ms
90,872 KB
testcase_16 AC 83 ms
90,636 KB
testcase_17 AC 87 ms
90,476 KB
testcase_18 AC 88 ms
90,840 KB
testcase_19 AC 83 ms
89,724 KB
testcase_20 AC 84 ms
89,788 KB
testcase_21 WA -
testcase_22 AC 66 ms
72,304 KB
testcase_23 AC 67 ms
72,324 KB
testcase_24 AC 65 ms
72,220 KB
testcase_25 WA -
testcase_26 AC 68 ms
71,984 KB
testcase_27 WA -
testcase_28 AC 71 ms
72,116 KB
testcase_29 AC 65 ms
71,920 KB
権限があれば一括ダウンロードができます

ソースコード

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 -= min(2, D[i])
    else:
        break
print(ans) 
0