题目:

题解:
class Solution {
List<Integer> t = new ArrayList<Integer>();
List<List<Integer>> ans = new ArrayList<List<Integer>>();
public List<List<Integer>> subsetsWithDup(int[] nums) {
Arrays.sort(nums);
int n = nums.length;
for (int mask = 0; mask < (1 << n); ++mask) {
t.clear();
boolean flag = true;
for (int i = 0; i < n; ++i) {
if ((mask & (1 << i)) != 0) {
if (i > 0 && (mask >> (i - 1) & 1) == 0 && nums[i] == nums[i - 1]) {
flag = false;
break;
}
t.add(nums[i]);
}
}
if (flag) {
ans.add(new ArrayList<Integer>(t));
}
}
return ans;
}
}







![华为昇腾310B1平台视频解码失败[ERROR] Send frame to vdec failed, errorno:507018](https://img-blog.csdnimg.cn/direct/c8c5a3e37c4147c5a9c71afa6622dbcb.png)










![51 单片机[2-1]:点亮一个LED](https://img-blog.csdnimg.cn/img_convert/1c79b1302f7a54cb48809427d581a9be.png)
