func_code_string: #include <bits/stdc++.h>   using namespace std;   map<pair<int, int>, int> cnt;   map<char, int> id;   vector<pair<char, char> > v;   map<pair<char, char>, bool> vis;   map<char, int> counter;   int main() {     id[ R ] = 4;     id[ G ] = 3;     id[ B ] = 2;     id[ Y ] = 1;     id[ W ] = 0;     id[ 1 ] = 9;     id[ 2 ] = 8;     id[ 3 ] = 7;     id[ 4 ] = 6;     id[ 5 ] = 5;     int cnt = 0;     int n;     cin >> n;     for (int i = 0; i < n; i++) {       string a;       cin >> a;       if (vis[make_pair(a[0], a[1])] == false) {         cnt++;         vis[make_pair(a[0], a[1])] = true;         v.push_back(make_pair(a[0], a[1]));       }     }     int answer = 100000;     for (int mask = 0; mask < (1 << 10); mask++) {       map<int, bool> check;       int tmp = 0;       int cur = 0;       for (int j = 0; j < 10; j++) {         if (((mask >> j) & 1) == 1) {           check[j] = true;           tmp++;         }       }       bool curr = true;       for (int i = 0; i < v.size(); i++) {         for (int j = i + 1; j < v.size(); j++) {           if (v[i].first != v[j].first) {             if (check[id[v[i].first]] == true or check[id[v[j].first]] == true) {               continue;             }             if (v[i].second != v[j].second) {               if (check[id[v[i].second]] == 1 or check[id[v[j].second]] == 1) {                 continue;               }             }             curr = false;           } else {             if (v[i].second != v[j].second) {               if (check[id[v[i].second]] == 1 or check[id[v[j].second]] == 1) {                 continue;               }             }             curr = false;           }         }       }       if (curr) answer = min(answer, tmp);     }     cout << answer << endl;   }   