回答編集履歴
1
sum += a[i] を sum + a[i] に変更
test
CHANGED
@@ -46,7 +46,7 @@
|
|
46
46
|
|
47
47
|
for (int i = 0; i < n; i++)
|
48
48
|
|
49
|
-
if (s >> i & 1) sum +
|
49
|
+
if (s >> i & 1) sum + a[i];
|
50
50
|
|
51
51
|
b.insert(sum);
|
52
52
|
|