#include <iostream> #include <string> #include <vector> using namespace std; int main() { string t, s; cin >> t >> s; int s_size = s.size(); vector<int> next(s_size); int p = 0, i = 1; while (i < s_size) { if (s[i] == s[p]) { next[i++] = ++p; } else { if (p == ...