func_code_string: #include <bits/stdc++.h>   using namespace std;   int Q, N, M, K, L;   int A[5001];   int MAPPING[10001];   int CHK[10001];   int RET[10001];   map<int, int> MAP;   int map_idx = 0;   int main() {     ios::sync_with_stdio(false);     cin >> N;     for (int i = 0; i < N; i++) {       cin >> A[i];       if (A[i] == 0) continue;       int b = 1;       int x = A[i];       if (x < 0) x *= -1;       for (int j = 2; j * j <= x; j++) {         int a = 0;         while (x % j == 0) {           a++;           x /= j;         }         if (a & 1) b *= j;       }       b *= x;       if (A[i] < 0) b *= -1;       if (MAP.count(b) == 1)         MAPPING[i] = MAP[b];       else {         MAP[b] = map_idx++;         MAPPING[i] = MAP[b];       }     }     int now = 0;     for (int i = 0; i < N; i++) {       for (int j = i; j < N; j++) {         if (A[j] == 0) {           RET[max(now, 1)]++;           continue;         }         if (CHK[MAPPING[j]] == 0) {           now++;           CHK[MAPPING[j]] = 1;         }         RET[max(now, 1)]++;       }       now = 0;       memset(CHK, 0, sizeof(CHK));     }     for (int i = 1; i <= N; i++) cout << RET[i] <<    ;     cin >> N;     return 0;   }   