結果

問題 No.2126 MEX Game
ユーザー ああいいああいい
提出日時 2022-11-29 13:25:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 517 ms
コンパイル使用メモリ 81,664 KB
実行使用メモリ 82,944 KB
最終ジャッジ日時 2024-04-16 08:44:55
合計ジャッジ時間 3,544 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,712 KB
testcase_01 AC 41 ms
51,840 KB
testcase_02 AC 41 ms
51,712 KB
testcase_03 AC 42 ms
51,840 KB
testcase_04 AC 42 ms
52,096 KB
testcase_05 WA -
testcase_06 AC 42 ms
51,584 KB
testcase_07 WA -
testcase_08 AC 41 ms
51,840 KB
testcase_09 AC 43 ms
51,712 KB
testcase_10 AC 89 ms
82,176 KB
testcase_11 AC 92 ms
82,944 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 84 ms
79,872 KB
testcase_16 AC 82 ms
79,232 KB
testcase_17 AC 88 ms
81,280 KB
testcase_18 AC 87 ms
81,920 KB
testcase_19 AC 67 ms
77,952 KB
testcase_20 AC 64 ms
76,288 KB
testcase_21 WA -
testcase_22 AC 42 ms
51,840 KB
testcase_23 AC 41 ms
51,584 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int,input().split()))

A.sort(reverse = True)
ans = 0
import sys
while A:
    if A[-1] != ans:
        print(ans)
        exit()
    if len(A) <= 1:
        print(ans)
        exit()
    if A[-2] != ans:
        print(ans)
        exit()
    while A and A[-1] == ans:
        A.pop()
    ans += 1
    
print(ans)
0