func_code_string: #include <bits/stdc++.h>   using namespace std;   int z[100005], cnt[100005];   char s[100005];   void solve() {     int n, t, L, R;     n = strlen(s), L = R = 0;     z[0] = n;     for (int i = 1; i < n; i++) {       if (R < i) {         L = R = i;         while (R < n && s[R - L] == s[R]) R++;         z[i] = R - L, R--;       } else {         t = i - L;         if (z[t] + i - 1 < R)           z[i] = z[t];         else {           L = i;           while (R < n && s[R - L] == s[R]) R++;           z[i] = R - L, R--;         }       }     }     int ret = 0;     for (int i = (n)-1; i >= (0); i--) {       if (z[i] + i >= n) ++ret;       ++cnt[z[i]];     }     for (int i = (n)-1; i >= (0); i--) cnt[i] += cnt[i + 1];     printf( %d n , ret);     for (int i = (n)-1; i >= (0); i--)       if (z[i] + i >= n) printf( %d %d n , n - i, cnt[n - i]);   }   int main() {     scanf( %s , s);     solve();     return 0;   }   