Guest User

Untitled

a guest
Sep 19th, 2017
931
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3. bool b[105];
  4. int main()
  5. {
  6.     int n,x;
  7.     scanf("%d%d",&n,&x);
  8.     while (n--)
  9.     {
  10.         int a;
  11.         scanf("%d",&a);
  12.         b[a]=1;
  13.     }
  14.     int ans=b[x];
  15.     for (int i=0;i<x;i++)
  16.     ans+=!b[i];
  17.     printf("%d",ans);
  18. }
RAW Paste Data