#include <bits/stdc++.h>
using namespace std;
#define int long long
int t;
signed main(){
cin >> t;
while (t--){
int v,n,tmp,sum = 0,ans = 0;
bool dp[20005] = {};
cin >> n >> v;
dp[0] = 1;
while (n--){
cin >> tmp;
sum += tmp;
for (int i = min(sum,20000000000ll);i >= tmp;i--) if (dp[i - tmp]) dp[i] = 1;
}
while (!dp[v - ans]) ans++;
cout << v - ans << "\n";
}
return 0;
}
Runtime Error:SIGSEGV
怎么回事