Source Code
#include <iostream>

using namespace std;

int main() {
	long long n, d, tmp;
	cin >> n >> d;
	for (long long i = 0; i < n; i++) {
		cin >> tmp;
		if (tmp == d);
		cout << "1";
		return 0;
	}
	cout << "0";
	return 0

}
Copy
Legendary MohaDarkness
GNU G++17
0 ms
0 KB
Compilation Error