func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 50010;   int n;   char s[maxn];   int main() {     while (scanf( %s , s) != EOF) {       n = strlen(s);       int len = 1;       while (len <= n / 2) {         int cnt = 0, start = len;         for (int i = len; i < n; i++) {           if (cnt == len) break;           if (s[i] != s[i - len]) {             start = i + 1;             cnt = 0;           } else             cnt++;         }         if (cnt == len) {           for (int i = start + len; i < n; i++) s[i - len] = s[i];           n -= len;           s[n] =   0 ;         } else           len++;       }       printf( %s n , s);     }     return 0;   }   