#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long int ll; typedef pair P; const ll INF=1e18+1; int main() { int n; ll m; cin>>n>>m; ll a[500]; ll sum=0; for(int i=0; i>a[i]; sum+=a[i]; } ll s=0; for(int i=0; i>k; s+=(a[i]*k); } if(s=a[i]; j--){ dp[t&1][j]=min(dp[t&1][j], dp[t&1][j-a[i]]+(1ll<>=1; if(s==0){ if(dp[(t+1)&1][0]