#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define F1(x,y,z) for(int x=y;xz;x--) #define F4(x,y,z) for(int x=y;x>=z;x--) #define pb push_back #define LL long long #define co complex #define MAX 100005 #define AMAX 1500 #define MOD 1000000007 #define f(c,d) ((1<<(c))*(d)) using namespace std; int n,k,x[MAX],ta; vector dp[105][105],ans; vector add(vector& a,vector& b){ vector t; ta=0; F1(c,0,max(a.size(),b.size())){ if(c& a){ return a.size()>1||a[0]!=0; } int main(){ while(scanf("%d%d",&n,&k)==2){ F1(a,0,n)scanf("%d",&x[a]); F1(a,0,n){ F1(b,0,105){ dp[a][b].clear(); dp[a][b].pb(0); } dp[a][1][0]=1; F1(b,0,a)if(x[b]