func_code_string: #include <bits/stdc++.h>   using namespace std;   int ans, n;   vector<pair<int, int> > vec;   string s, t;   int lcp1[5005][5005];   int lcp2[5005][5005];   void LCP(string &s, string &t, int lcp[5005][5005]) {     for (int i = (int)s.size() - 1; i >= 0; i--) {       for (int j = (int)t.size() - 1; j >= 0; j--) {         if (s[i] == t[j]) {           lcp[i][j] = lcp[i + 1][j + 1] + 1;         } else {           lcp[i][j] = 0;         }       }     }   }   void solve() {     LCP(s, t, lcp1);     reverse(s.begin(), s.end());     LCP(s, t, lcp2);     for (int ti = 0; ti < t.size();) {       int mx1 = 0, mx1_si = -1;       int mx2 = 0, mx2_si = -1;       for (int si = 0; si < s.size(); si++) {         if (mx1 < lcp1[si][ti]) {           mx1 = lcp1[si][ti];           mx1_si = si;         }         if (mx2 < lcp2[si][ti]) {           mx2 = lcp2[si][ti];           mx2_si = si;         }       }       if (mx1 == 0 && mx2 == 0) {         ans = -1;         break;       } else if (mx1 >= mx2) {         ans++;         vec.push_back(pair<int, int>(mx1_si + 1, mx1_si + mx1 - 1 + 1));         ti += mx1;       } else {         ans++;         vec.push_back(pair<int, int>(n - mx2_si, n - (mx2_si + mx2 - 1)));         ti += mx2;       }     }     cout << ans << endl;     for (int i = 0; i < (ans); i++) {       cout << vec[i].first <<     << vec[i].second << endl;     }   }   int main() {     cin >> s;     cin >> t;     n = (int)s.size();     solve();     return 0;   }   