ll n,k,a,z,d[20001]; { d[10000]=1; rd(n,k); rep(n){ rd(a); a-=k; if(a>=0) rep(i,20001-a)d[i]+=d[i+a]; else rrep(i,20001+a)d[i-a]+=d[i]; } z+=d[0..10000]; wt(z-1); }