Leetcode每日一题

1863. 找出所有子集的异或总和再求和 传送门:https://leetcode.cn/problems/sum-of-all-subset-xor-totals/description/ 方法1:暴力 长度为 n 的集合的子集个数为 $2^n$ 个,可以看成一个 n 位的二进制数,0 表示不取,1 表示取 外层循环遍历这 $2^n$ 个子集,内层循环逐位检测是否为 1 ...

四月 7, 2025 · 5 分钟 · Mi Yu