SHARE
TWEET

Untitled

a guest Feb 25th, 2020 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4. int fr[101],v[101],n,i;
  5. int main()
  6. {
  7.     cin>>n;
  8.     for(i=1;i<=n;i++)
  9.     {
  10.         cin>>v[i];
  11.         fr[v[i]]++;
  12.     }
  13.     for(i=1;i<1000000000;i++)
  14.     {
  15.         if(fr[i]==0) {cout<<i;break;}
  16.     }
  17.     return 0;
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top