# 8VC Venture Cup 2016 - Elimination Round F. Group Projects（DP）★ ★

1. 第i个数单组一组

2.第i个数新开一组， 作为新组的最小值

3.第i个数关闭一组， 作为这个组的最大值。

4.第i个数进入j个组中的某一组。

#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <cmath>
#include <vector>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define L(i) i<<1
#define R(i) i<<1|1
#define INF  0x3f3f3f3f
#define pi acos(-1.0)
#define eps 1e-9
#define maxn 1000100
#define MOD 1000000007

int n,k;
int a[maxn];
long long dp[2][220][1010];

int main()
{
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
int t,C = 1;
//scanf("%d",&t);
while(scanf("%d%d",&n,&k) != EOF)
{
for(int i = 1; i <= n; i++)
scanf("%d",&a[i]);
sort(a+1,a+n+1);
a[0] = a[1];
int u = 0;
memset(dp,0,sizeof(dp));
dp[u][0][0] = 1;
for(int i = 1; i <= n; i++)
{
u ^= 1;
memset(dp[u],0,sizeof(dp[u]));
for(int j = 0; j <= n; j++)
{
int add = (a[i] - a[i-1]);
for(int v = 0; v <= k; v++)
{
if(!dp[u^1][j][v])
continue;
break;
if(j > 0)
}
}
}
long long ans = 0;
for(int i = 0; i <= k; i++)
ans = (ans + dp[u][0][i]) % MOD;
printf("%lld\n",ans);
}
return 0;
}


#### 8VC Venture Cup 2016 - Elimination Round F. Group Projects（DP）

2016-02-19 22:06:12

#### 8VC Venture Cup 2016 - Elimination Round F. Group Projects dp

2017-03-29 12:14:45

#### 8VC Venture Cup 2017 - Elimination Round

2017-01-16 04:10:31

#### codeforces626F Group Projects(dp)

2016-02-15 21:58:19

#### CodeForces 626F Group Projects（dp）

2016-04-06 22:38:16

#### 8VC Venture Cup 2016 - Elimination Round题解

2016-02-16 21:42:47

#### 8VC Venture Cup 2016 - Elimination Round总结

2016-02-20 00:09:33

#### Codeforces 8VC Venture Cup 2016 - Elimination Round

2016-02-18 14:29:35

#### 8VC Venture Cup 2016 - Elimination Round 总结

2016-02-15 23:16:31

#### 8VC Venture Cup 2016 - Elimination RoundB. Cards

2016-02-14 11:01:56