import java.util.*;
public class Main {
public static void main(String[] args) {
int len = 0;
for (int comb = 0; comb < (1 << len); comb++) {
ArrayList<Integer> list = new ArrayList<>();
for (int i = 0, bit = 1; i < len; i++, bit <<= 1) {
if ((comb & bit) > 0) {
list.add(i);
}
}
for (Integer integer : list) {
System.out.print(integer+" ");
}
System.out.println();
}
}
}
len 表示0.。。。num的长度