結果
| 問題 |
No.2126 MEX Game
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2022-11-18 22:16:23 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 448 bytes |
| コンパイル時間 | 138 ms |
| コンパイル使用メモリ | 81,872 KB |
| 実行使用メモリ | 84,348 KB |
| 最終ジャッジ日時 | 2024-09-20 02:37:03 |
| 合計ジャッジ時間 | 2,498 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 10 |
ソースコード
#==================================================
def solve():
from collections import Counter
N=int(input())
A=list(map(int,input().split()))
A_max=max(A)
C=[0]*(max(A)+2)
for a in A:
C[a]+=1
C[A_max]-=1
target=0
while C[target]<=1:
C[target]+=1
break
mex=0
while C[mex]>=2:
mex+=1
return mex
#==================================================
print(solve())
Kazun