func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m, x, y, z, k, w;   char S[10005];   int dp[10005];   int ok[20005];   bool check(int x, int y, int pos) {     for (int i = (0); i < (pos); i++)       if (S[i + x] != S[i + y]) return 1;     return 0;   }   struct node {     char S[4];   } ANS[20005];   bool cmp(const node& a, const node& b) { return strcmp(a.S, b.S) < 0; }   int main() {     scanf( %s , S);     n = strlen(S);     dp[n - 2] = 2;     dp[n] = -1;     dp[n - 3] = 1;     for (int i = (n - 4); i >= (5); i--) {       if (dp[i + 3] == 1 && check(i, i + 3, 3))         dp[i] += 1;       else if (dp[i + 3] == 2 || dp[i + 3] == 3)         dp[i] += 1;       if (dp[i + 2] == 2 && check(i, i + 2, 2))         dp[i] += 2;       else if (dp[i + 2] == 1 || dp[i + 2] == 3)         dp[i] += 2;     }     for (int i = (5); i < (n); i++) {       if (dp[i] >= 2) {         dp[i] -= 2;         ANS[w].S[0] = S[i];         ANS[w].S[1] = S[i + 1];         w++;       }       if (dp[i] >= 1) {         ANS[w].S[0] = S[i];         ANS[w].S[1] = S[i + 1];         ANS[w].S[2] = S[i + 2];         w++;       }     }     sort(ANS, ANS + w, cmp);     for (int i = (1); i < (w); i++)       if (strcmp(ANS[i].S, ANS[i - 1].S) == 0) ok[i] = 1;     x = 0;     for (int i = (0); i < (w); i++)       if (ok[i] == 0) x++;     printf( %d n , x);     for (int i = (0); i < (w); i++)       if (ok[i] == 0) printf( %s n , ANS[i].S);     return 0;   }   