[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); }