func_code_string: #include <bits/stdc++.h>   using namespace std;   int main(int argc, char *argv[]) {     map<int, int> set;     int n, a, b, check1, check2, temp;     cin >> n >> a >> b;     int arr[n];     vector<int> check;     for (int i = int(0); i <= int(n - 1); i++) {       cin >> arr[i];       set[arr[i]] = -1;     }     if (a == b) {       for (int i = int(0); i <= int(n - 1); i++) {         if (set[a - arr[i]] == 0) {           cout <<  NO  << endl;           return 0;         }       }       cout <<  YES  << endl;       for (int i = int(0); i <= int(n - 1); i++) {         cout <<  0  ;       }       return 0;     }     for (int i = int(0); i <= int(n - 1); i++) {       if (set[arr[i]] != -1) continue;       check.clear();       check.push_back(arr[i]);       check1 = a - arr[i];       check2 = b - arr[i];       bool f = false;       while (!f) {         if (set[check1] == -1 && set[check2] == -1) {           check.push_back(check1);           check.push_back(check2);           temp = check1;           check1 = a - check2;           check2 = b - temp;         } else if (set[check1] == -1) {           check.push_back(check1);           f = 1;           for (int i = int(0); i <= int(check.size() - 1); i++) {             set[check.at(i)] = 1;           }         } else if (set[check2] == -1) {           check.push_back(check2);           f = 1;           for (int i = int(0); i <= int(check.size() - 1); i++) {             set[check.at(i)] = 2;           }         } else {           cout <<  NO  << endl;           return 0;         }       }     }     cout <<  YES  << endl;     for (int i = int(0); i <= int(n - 1); i++) {       cout << set[arr[i]] - 1 <<    ;     }     return EXIT_SUCCESS;   }   