
public class CombinationL {
	int[] P;
	int n,M;
	
	public CombinationL() {
		// TODO Auto-generated constructor stub
		n = 5; M = 3;
		P = new int[M];
		C(0, M);
	}
	
	void C(int k, int m){
		
		if(m == 0){
			for(int i : P) System.out.print(i + " ");
			System.out.println();
			return;
		}
		if(k >= n) return;
		
		C(k+1, m); 	//???
		P[M-m] = k+1; C(k+1, m-1); //?
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		CombinationL combination = new CombinationL();
	}

}
