You are given a list of N integers and a value K. Print 1 if K exists in the given list of N integers, otherwise print β1.

### Input:

- First-line will contain two numbers N and K.
- Next line contains N space-separated numbers.

### Output:

*Print the answer in a new line.

my code

```
#include <stdio.h>
int main()
{
int n,k,i,a[100000],count=0;
scanf("%d %d\n",&n,&k);
for(i=0;i<n;i++)
{
scanf("%d ",&a[i]);
if(a[i] == k)
{
count = count + 1;
}
}
if(count == 1)
{
printf("1");
}
else
{
printf("-1");
}
return 0;
}
```