public static int kSum3(int[] A, int subNum, int target) {
		if (A == null || A.length == 0 || subNum == 0 || target == 0) {
			return 0;
		}
		int[][][] f = new int[A.length + 1][subNum + 1][target + 1];
		f[0][0][0] = 0;
		for (int a = 1; a <= A.length; a++) {
			for (int t = target; t >= A[a]; t--) {
				for (int s = 1; s <= subNum; s++) {
					f[a][s][t] = f[a - 1][s][t];
					if (t - A[a] >= 0) {
						f[a][s][t] += f[a - 1][s - 1][t - A[a]];
					}
				}
			}
		}
		return f[A.length][subNum][target];
	}