Number of Excellent Pairs
Given an array of integers and a threshold k, count the number of ordered pairs (i, j) where popcount(nums[i] & nums[j]) + popcount(nums[i] | nums[j]) >= k.
Given an array of integers and a threshold k, count the number of ordered pairs (i, j) where popcount(nums[i] & nums[j]) + popcount(nums[i] | nums[j]) >= k.