#include using namespace std; #define rep(i,a,b) for(int i=a;i pre[105][201010]; void processB() { dp[0][0] = 1; pre[0][0] = { -1, 0 }; rep(i, 0, NB) rep(j, 0, 101010) if(dp[i][j]) { dp[i + 1][j] = 1; pre[i + 1][j] = { i, j }; dp[i + 1][j + B[i]] = 1; pre[i + 1][j + B[i]] = { i, j }; } } //----------------------------------------------------------------------------------- vector processC() { rep(flag, 0, 1 << NC) { ll sm = 0; rep(j, 0, NC) if (flag & (1 << j)) sm += C[j]; ll d = X - sm; if (d < 0 || 101010 <= d) continue; if (!dp[NB][d]) continue; vector res; rep(j, 0, NC) if (flag & (1 << j)) res.push_back(C[j]); pair t = { NB, d }; while (0 <= t.first) { pair tt = pre[t.first][t.second]; if (tt.second < t.second) res.push_back(t.second - tt.second); swap(t, tt); } return res; } return {}; } //----------------------------------------------------------------------------------- int main() { cin >> N >> X; rep(i, 0, N) cin >> A[i]; divide(); processB(); auto v = processC(); if (v.size() == 0) { printf("No\n"); return 0; } rep(i, 0, N) { bool ok = false; for (int &j : v) if (A[i] == j) { ok = true, j = -1; break; } if (ok) printf("o"); else printf("x"); } printf("\n"); }