Source Code
#include <stdio.h>
int main(){
  long n,d;
  scanf("%ld%ld",&n,&d);
  long a[n];
  for(long i = 0; i < n; i++){
    scanf("%ld",&a[i]);
    if(a[i] == d){
      printf("1");
      return 0;
    }
  }
  printf("0");
  return 0;
  
}
Copy
Legendary Ayoooy
GNU G++17
3 ms
828 KB
Wrong Answer