javascript bit count 242ms
\nconst bitCount = (n) => { n = n - ((n >> 1) & 0x55555555); n = (n & 0x33333333) + ((n >> 2) & 0x33333333); return ((n + (n >> 4) & 0xF0F0F0F) * 0x1010101) >> 
```\nconst bitCount = (n) => { n = n - ((n >> 1) & 0x55555555); n = (n & 0x33333333) + ((n >> 2) & 0x33333333); return ((n + (n >> 4) & 0xF0F0F0F) * 0x1010101) >> 24; };\n\nconst countExcellentPairs = (a, k) => {\n    let u = [...new Set(a)], f = Array(30).fill(0), res = 0;\n    for (const x of u) {\n        let cnt = bitCount(x);\n        f[cnt]++;\n    }\n    for (let i = 0; i < 30; i++) {\n        for (let j = 0; j < 30; j++) {\n            if (i + j >= k) res += f[i] * f[j];\n        }\n    }\n    return res;\n};\n```
['Bit Manipulation', 'JavaScript']