C++||Bit Solution||Hashing Using C++||Easy to Understand
\nThe Inclusion-Exclusion Principle\nbits(num1 OR num2) + bits(num1 AND num2) = bits(num1) + bits(num2)\n\nclass Solution {\npublic:\n    long long countExcelle
\nThe Inclusion-Exclusion Principle\nbits(num1 OR num2) + bits(num1 AND num2) = bits(num1) + bits(num2)\n```\nclass Solution {\npublic:\n    long long countExcellentPairs(vector<int>& nums, int k) \n    {\n        vector<long long> cnt(30,0);\n        long long ans=0;\n        for(auto &x:unordered_set(nums.begin(),nums.end()))\n        {\n            cnt[__builtin_popcount(x)]++;\n        }\n        for(int i=0;i<30;i++)\n        {\n            for(int j=0;j<30;j++)\n            {\n                if(i+j>=k)\n                {\n                    ans+=cnt[i]*cnt[j];\n                }\n            }\n        }\n        return ans;\n        \n    }\n};\n```\n//if you like the solution plz upvote.
['Bit Manipulation', 'C']