結果

問題 No.2126 MEX Game
ユーザー tamatotamato
提出日時 2022-11-18 21:38:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 536 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 81,760 KB
実行使用メモリ 97,656 KB
最終ジャッジ日時 2023-10-20 06:25:15
合計ジャッジ時間 2,939 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,452 KB
testcase_01 AC 41 ms
53,452 KB
testcase_02 AC 41 ms
53,452 KB
testcase_03 AC 41 ms
53,452 KB
testcase_04 AC 41 ms
53,452 KB
testcase_05 AC 42 ms
53,452 KB
testcase_06 AC 40 ms
53,452 KB
testcase_07 AC 41 ms
53,452 KB
testcase_08 AC 41 ms
53,452 KB
testcase_09 AC 40 ms
53,452 KB
testcase_10 AC 79 ms
92,424 KB
testcase_11 AC 79 ms
92,424 KB
testcase_12 AC 78 ms
92,424 KB
testcase_13 AC 80 ms
92,424 KB
testcase_14 AC 79 ms
94,268 KB
testcase_15 AC 78 ms
94,268 KB
testcase_16 AC 80 ms
94,228 KB
testcase_17 AC 71 ms
83,132 KB
testcase_18 AC 69 ms
83,084 KB
testcase_19 AC 63 ms
80,480 KB
testcase_20 AC 63 ms
80,480 KB
testcase_21 AC 79 ms
97,656 KB
testcase_22 AC 41 ms
53,456 KB
testcase_23 AC 40 ms
53,456 KB
testcase_24 AC 41 ms
53,456 KB
testcase_25 WA -
testcase_26 AC 41 ms
53,456 KB
testcase_27 AC 40 ms
53,456 KB
testcase_28 AC 40 ms
53,456 KB
testcase_29 AC 41 ms
53,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353


def main():
    import sys
    from collections import Counter
    input = sys.stdin.readline

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

    C = Counter(A)
    flg = 1
    ans = 0
    for a in range(10 ** 5 + 10):
        if C[a] == 0:
            break
        elif C[a] == 1:
            if flg and (a + 1) * 2 <= N:
                flg = 0
                ans += 1
            else:
                break
        else:
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()
0