simple hash map solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    long long countExcellentPairs(vector<int>& nums, int k) {\n        vector<int> v;\n        int n = nums.size();\n        set<int> st(nums.begin(),nums.end());\n        vector<int> a(st.begin(),st.end());\n        vector<int> cnt(31,0);\n        for(int i = 0; i < a.size(); i++){\n            int x = __builtin_popcount(a[i]);\n            cnt[x]++;\n            v.push_back(x);\n        }\n        \n        \n         long long ans = 0;\n        // for(int i = 0; i < v.size(); i++){\n        //     mp[v[i]]++;\n        // }\n       \n        for(int i = 1; i < 31; i++){\n            for(int j = 1; j < 31; j++){\n                if(i+j >= k){\n                    ans += cnt[i]*cnt[j];\n                }\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']