private static void f(int x, int k, int n,
			ArrayList<ArrayList<Integer>> all, int[] xs, int len, int t) {
		if (k == 0 && len == t) {
			ArrayList<Integer> nums = new ArrayList<Integer>();
			for (int i = 0; i < len; i++) {
				nums.add(xs[i]);
			}
			all.add(nums);
		} else if (k == 0) {
			return;// a invalid path
		} else {
			for (int i = x + 1; i <= n; i++) {
				xs[len] = i;
				f(i, k - 1, n, all, xs, len + 1, t);
			}
		}
	}