func_code_string: #include <bits/stdc++.h>   using namespace std;   int a[100005], ans[100005], ti[100005], app[100005], t, n;   int cnt(int k) {     int ret = 1, count = 0;     ++t;     for (int i = 1; i <= n; i++) {       if (ti[a[i]] != t) {         ti[a[i]] = t;         app[a[i]] = false;       }       if (!app[a[i]]) {         if (count == k) {           count = 0;           ret++;           ti[a[i]] = ++t;         }         count++;       }       app[a[i]] = true;     }     return ret;   }   void solve(int l, int r, int lo, int hi) {     if (l > r) return;     int mid = (l + r) / 2;     int res = lo == hi ? lo : cnt(mid);     ans[mid] = res;     solve(l, mid - 1, res, hi);     solve(mid + 1, r, lo, res);   }   int main() {     cin >> n;     for (int i = 1; i <= n; i++) scanf( %d , &a[i]);     solve(1, n, 1, n);     for (int i = 1; i <= n; i++) {       if (i > 1) printf(   );       printf( %d , ans[i]);     }     cout << endl;   }   