func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 100100 * 3;   const int INF = 1E9;   const int base = 1E9 + 7;   void no() {     cout <<  no n ;     exit(0);   }   int a[maxn];   pair<int, int> b[maxn];   char ans[3030][3030];   int n, m;   void validate() {     vector<int> draws;     n = m;     for (int i = 0; i < n; i++)       if (a[i] & 1) draws.push_back(i);     memset(ans, 0, sizeof(ans));     for (int i = 0; i < draws.size(); i += 2) {       int x, y;       x = draws[i], y = draws[i + 1];       a[x]--, a[y]--;       ans[x][y] = ans[y][x] =  D ;     }     for (int i = 0; i < n; i++) b[i] = make_pair(a[i], i);     for (int i = 0; i < n; i++) ans[i][i] =  X ;     for (int i = 0; i < n; i++) {       sort(b + i, b + n);       reverse(b + i, b + n);       int g = b[i].second;       for (int j = n - 1; j > i; j--)         if (ans[g][b[j].second] == 0) {           char w =  W , l =  L ;           if (b[i].first > 0) {             ans[g][b[j].second] = w, ans[b[j].second][g] = l;             b[i].first -= 2;           } else {             ans[g][b[j].second] = l, ans[b[j].second][g] = w;             b[j].first -= 2;           }         }       if (b[i].first != 0) no();     }     puts( yes );     for (int i = 0; i < n; i++) puts(ans[i]);   }   int solve() {     cin >> m >> n;     for (int i = 0; i < n; i++) cin >> a[i];     int sum = 0;     for (int i = 0; i < n; i++) sum += a[i];     if (sum > m * (m - 1)) no();     if (sum + (m - n) * a[n - 1] < m * (m - 1)) no();     while (sum < m * (m - 1))       for (int i = n; sum < m * (m - 1) && i < m; i++) a[i]++, sum++;     validate();   }   int main() {     solve();     return 0;   }   