func_code_string: #include <bits/stdc++.h>   using namespace std;   int c[25];   bool vis[25];   int n, m;   bool dfs(int p, int s, int k) {     if (p > n) return m == n - 1;     if (!k) return dfs(p + 1, p, c[p + 1]);     for (; s; s--)       if (!vis[s] && c[s] + 1 < c[p] && c[s] + 1 <= k) {         vis[s] = true;         k -= c[s] + 1;         m++;         if (dfs(p, s - 1, k)) return true;         vis[s] = false;         k += c[s] + 1;         m--;       }     return false;   }   int main() {     while (~scanf( %d , &n)) {       for (int i = 1; i <= n; ++i) {         scanf( %d , &c[i]);         c[i]--;       }       sort(c + 1, c + 1 + n);       memset(vis, false, sizeof(vis));       m = 0;       puts(dfs(1, 0, c[1]) ?  YES  :  NO );     }     return 0;   }   