Facebook
From Small Bee, 9 Years ago, written in Plain Text.
This paste is a reply to Re: Re: Untitled from Morose Horse - view diff
Embed
Download Paste or View Raw
Hits: 1070
  1. #include <iostream>
  2. #include <cstdio>
  3. using namespace std;
  4. bool tab [500001];
  5. int main()
  6. {
  7. int n,a,i=0;
  8. bool x;
  9. scanf("%d",&n);
  10. for(int i=0;i<n-1;i++)
  11. {scanf("%d",&a);
  12. tab[a]=true;}
  13.  
  14.  
  15. while(true)
  16. { if(tab[i]==false) {cout<<i; break;}
  17. else i++;}
  18.     return 0;
  19. }
  20.  
  21.