func_code_string: #include <bits/stdc++.h>   using namespace std;   long long t[5005], c[5005], ans[5005], n, i, l, b, v;   int main() {     cin >> n;     for (i = 1; i <= n; i++) cin >> t[i];     for (l = 1; l <= n; l++) {       for (i = 1; i <= n; i++) c[i] = 0;       b = 0;       for (i = l; i <= n; i++) {         v = t[i];         c[v]++;         if (c[v] > c[b] || (c[v] == c[b] && v < b)) b = v;         ans[b]++;       }     }     for (i = 1; i <= n - 1; i++) cout << ans[i] <<    ;     cout << ans[n] << endl;     return 0;   }   