Source Code
#include <iostream>
using namespace std;

int main() {
	int n , d ; 
	cin >> n >> d ;
	int flag = 0;
	for(int i=0 ; i<n ; i++){
		int x ; 
		scanf("%d" , &x) ; 
		if(x == d){
			flag = 1;
		}
	} 
	cout << flag;
	return 0;
}
Copy
Legendary Zeina.A
GNU G++17
3 ms
928 KB
Wrong Answer