Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- bool b[105];
- int main()
- {
- int n,x;
- scanf("%d%d",&n,&x);
- while (n--)
- {
- int a;
- scanf("%d",&a);
- b[a]=1;
- }
- int ans=b[x];
- for (int i=0;i<x;i++)
- ans+=!b[i];
- printf("%d",ans);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement