結果
| 問題 |
No.2126 MEX Game
|
| コンテスト | |
| ユーザー |
tamato
|
| 提出日時 | 2022-11-18 21:38:54 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 536 bytes |
| コンパイル時間 | 159 ms |
| コンパイル使用メモリ | 81,936 KB |
| 実行使用メモリ | 98,180 KB |
| 最終ジャッジ日時 | 2024-09-20 02:02:40 |
| 合計ジャッジ時間 | 2,669 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 1 |
ソースコード
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()
tamato