[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

训练

未参加
状态
已结束
规则
IOI
题目
31
开始于
2024-7-15 9:00
结束于
2024-8-17 17:00
持续时间
800 小时
主持人
参赛人数
27