首页 > TAG信息列表 > numSlots

[Google] LeetCode 2172 Maximum AND Sum of Array 状态压缩DP

You are given an integer array nums of length n and an integer numSlots such that 2 * numSlots >= n. There are numSlots slots numbered from 1 to numSlots. You have to place all n integers into the slots such that each slot contains at most two numbers.