#include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int N,S; cin >> N >> S; vector A(N); for(auto &a : A) cin >> a; long long inf = 1e18; vector dp(S+1,inf); dp.at(A.at(0)) = 0; for(int i=0; i next(S+1,inf); for(int k=1; k<=S; k++){ if(dp.at(k) == inf) continue; if(k+a <= S) next.at(k+a) = min(next.at(k+a),dp.at(k)*2); if(k*a <= S) next.at(k*a) = min(next.at(k*a),dp.at(k)*2+1); } swap(dp,next); } long long num = dp.at(S); string answer = ""; for(int i=0; i