Open Draymonders opened 4 years ago
有一个数,比如5, 二进制表示为 101
101
子集有
101 -> 5 100 -> 4 1 -> 1
void enumerate_sub_collection(int x) { for (int t=x; t; t=(t-1)&x) { cout << t << endl; } }
枚举子集
有一个数,比如5, 二进制表示为
101
子集有
code