Advertisement
STANAANDREY

nuj ce

Apr 12th, 2022
957
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int n, x;
  6.     cin >> n >> x;
  7.     int *v = new int[n];
  8.     for (int i = 0; i < n; i++) cin >> v[i];
  9.     sort(v, v + n);
  10.     cout << (binary_search(v, v + n, x) ? "DA" : "NU") << endl;
  11.     return 0;
  12. }
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement