关于穷举 dfs(int x, int k){ if(x == k+1) .... for(int i = x+1; i <= n; i++) dfs(i, k); } 可以保证不重复,枚举出来的东西按顺序排