#include <bits/stdc++.h>
using namespace std;
//
const int mx = 1e6 + 5;
//
int n, T;
unordered_map<int, int> mp;
bitset<mx> dp(1);
//
void process (void)
{
    cin >> n >> T;
    for (int w; n--;)
        cin >> w,
        ++mp[w];

    for (auto [w, cnt] : mp)
    {
        int p;
        //
        for (p = 0; (1 << p + 1) - 1 <= cnt; ++p)
            if ((1LL << p) * w <= T)
                dp |= dp << (1 << p) * w;
        if (cnt > (1LL << p) - 1 && (cnt - (1 << p) + 1) * w <= T)
            dp |= dp << (cnt - (1 << p) + 1) * w;
    }

    for (int i = 1; i <= T; ++i)
        cout << dp[i];
}
//
signed main (void)
{
    ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
    process();
}