#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using P = pair; ll x; vector

big; vector

small; const int MN = 110; const int B = 10100; void solve() { int n = small.size(); static bool dp[MN][B*MN] = {}; dp[0][0] = true; for (int i = 1; i <= n; i++) { int d = small[i-1].first; for (int j = 0; j < B*MN; j++) { dp[i][j] = dp[i-1][j]; if (j >= d) { dp[i][j] |= dp[i-1][j-d]; } } } int m = (int)big.size(); for (int i = 0; i < (1<>j) & 1) { sm -= big[j].first; } } if (0 <= sm && sm < MN*B && dp[n][sm]) { static bool res[MN]; for (int j = 0; j < m; j++) { if ((i>>j) & 1) { res[big[j].second] = true; } } for (int j = n; j >= 1; j--) { if (dp[j-1][sm]) { continue; } sm -= small[j-1].first; res[small[j-1].second] = true; } string s = ""; for (int j = 0; j < n+m; j++) { if (res[j]) { s += 'o'; } else { s += 'x'; } } cout << s << endl; return; } } cout << "No" << endl; } int main() { int n; cin >> n >> x; for (int i = 0; i < n; i++) { int a; cin >> a; if (a < B) { small.push_back(P(a, i)); } else { big.push_back(P(a, i)); } } solve(); return 0; }