Source Code
#include <iostream>
#include <set>
#include <map>
#include <vector>
using namespace std;

int main() {
	int n, m;
	cin >> n >> m;
	for(int i = 0, x; i < n; ++i){
		cin >> x;
		if(x == m){
			cout << 1 ;
			return 0;
		}
	}
	cout << 0;
	return 0;
}
Copy
Legendary Bahou
GNU G++17
3 ms
652 KB
Wrong Answer