#P1554. [NOIP2002 普及组] 选数

[NOIP2002 普及组] 选数

Description

Input Format

Output Format

输出一个整数,表示种类数。
4 3
3 7 12 19
1

Hint

#include<bits/stdc++.h>
using namespace std;
int n,k,num[21],ans,a[22],s=0;
bool check(int x)
{
	//判断质数
}
void dfs(int now,int last)// now-选中个数 last-下一个选的位置
{
	if(now>k)
	{
		
		return;
	}
	for(int i=last+1;i<=n;i++)
	{
        num[now]=?;
        dfs(?,?);
	}
}
int main(){
	scanf("%d%d",&n,&k);
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	dfs(?,?);
	printf("%d\n",ans);
}

Source

NOIP