You are given an integer array nums and an integer k.
You are allowed to perform the following operation on each index at most once: replace nums[i] with any integer in the range nums[i] nums[i]
Return the maximum possible number of distinct elements in nums after applying these operations.
Constraints:
nums.length
nums[i]
k
You are given an integer array nums and an integer k.
You are allowed to perform the following operation on each index at most once: replace nums[i] with any integer in the range nums[i] nums[i]
Return the maximum possible number of distinct elements in nums after applying these operations.
Constraints:
nums.length
nums[i]
k