I want to know what this bit manipulation means:
for (int m = 1; m < (1 << n); ++m) {
for (int s = m; s; s = (s - 1) & m) {
// ....
}
}
The first for-loop is to enumerate all subsets of n elements, but what the second for-loop means?