結果
| 問題 |
No.2126 MEX Game
|
| コンテスト | |
| ユーザー |
mikam
|
| 提出日時 | 2022-11-19 16:35:20 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 669 bytes |
| コンパイル時間 | 2,069 ms |
| コンパイル使用メモリ | 203,812 KB |
| 最終ジャッジ日時 | 2025-02-08 22:47:05 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using vi = vector<int>;
template<typename T1,typename T2> bool chmax(T1 &a, const T2 b) {if (a < b) {a = b; return true;} else return false; }
template<typename T1,typename T2> bool chmin(T1 &a, const T2 b) {if (a > b) {a = b; return true;} else return false; }
signed main() {
int n;cin>>n;
map<int,int> mp;
rep(i,n){
int a;cin>>a;
mp[a]++;
}
set<int> st;
for(auto &e:mp){
e.second/=2;
if(e.second!=0)st.insert(e.first);
}
int ans = 0;
while(st.count(ans))ans++;
cout<<ans<<endl;
return 0;
}
mikam