思路:集合中所有元素之和为每个元素之和乘2^(元素个数-1) #include<bits/stdc++.h> using namespace std; typedef long long ll; int main() {