func_code_string: #include <bits/stdc++.h>   using namespace std;   int arr[1000], ans = 0;   int cnt[1000];   int main() {     int n;     scanf( %d , &n);     priority_queue<int> pq;     for (int i = 0; i < n; ++i) {       int x;       scanf( %d , &x);       pq.push(-x);     }     for (int i = 0; i < 1000; ++i) {       arr[i] = 0;       cnt[i] = 0;     }     while (!pq.empty()) {       int u = -pq.top();       pq.pop();       int p = -1, smallest = 100000;       for (int i = 0; i < ans; ++i)         if (arr[i] < smallest && cnt[i] <= u) {           smallest = cnt[i];           p = i;         }       if (p == -1) {         ++cnt[ans];         arr[ans++] = u;       } else {         ++cnt[p];         arr[p] = u;       }     }     printf( %d n , ans);     return 0;   }   