#3806
Maximum Bitwise AND After Increment Operations
international master · 1955 · lc hard +32 · 31.2% accepted · 75 likes · top 9%
Description
Given an integer array nums and integers k and m, increment any elements by 1 up to k times total, then select a subset of exactly m elements and return the maximum possible bitwise AND of such a subset.
Code
1
2
3