#include using namespace std; int dp[51][123456],n,s; vector v; bool can(int a){ memset(dp,0,sizeof(dp)); v[a+1]+=v[a]; dp[a+2][v[a+1]]++; for(int i=a+2;i=0;j--){ dp[i+1][j+v[i]]+=dp[i][j]; dp[i+1][j*v[i]]+=dp[i][j]; } } v[a+1]-=v[a]; return dp[n][s]; } signed main(){ cin>>n>>s; v.resize(n); for(int i=0;i>v[i]; for(int i=0;i