結果
問題 |
No.2126 MEX Game
|
ユーザー |
|
提出日時 | 2022-12-03 20:43:59 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 383 bytes |
コンパイル時間 | 185 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 97,408 KB |
最終ジャッジ日時 | 2024-10-11 00:17:30 |
合計ジャッジ時間 | 3,243 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 2 |
ソースコード
import sys input = sys.stdin.readline from collections import * N = int(input()) A = list(map(int, input().split())) cnt = Counter(A) need = 0 for i in range(10**5+10): if cnt[i]>=2: need += 2 elif cnt[i]==1: if need+1==N: print(i) break else: print(i+1) break else: print(i) break