#include #define be(v) (v).begin(),(v).end() #define pb(q) push_back(q) typedef long long ll; using namespace std; const ll mod=1000000007, INF=(1LL<<60); #define doublecout(a) cout<> n >> k; int a[n]; for(int i=0;i> a[i]; } int maki = 1 << n; vector dp(maki, 0); dp[0] = k; for(int i=1;i>j & 1){ dp[i] = max(dp[i], dp[i-(1<