結果
| 問題 |
No.2126 MEX Game
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2022-11-18 22:18:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 448 bytes |
| コンパイル時間 | 133 ms |
| コンパイル使用メモリ | 82,348 KB |
| 実行使用メモリ | 82,304 KB |
| 最終ジャッジ日時 | 2024-09-20 02:41:45 |
| 合計ジャッジ時間 | 2,507 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 WA * 3 |
ソースコード
#==================================================
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]>=2:
target+=1
C[target]+=1
mex=0
while C[mex]>=2:
mex+=1
return mex
#==================================================
print(solve())
Kazun