#include using namespace std; typedef long long ll; using ull = unsigned long long; vectorrolling_hash_search(string s,string t){ vectorindex_list; ll SL=s.size(); ll TL=t.size(); ull b=1e8+7; ull a=1; for (int i = 0; i < TL; i++) { a*=b; } ull s_hash = 0; for (int i = 0; i < TL; i++) { s_hash=s_hash*b+s[i]; } ull t_hash=0; for (int i = 0; i < TL; i++) { t_hash=t_hash*b+t[i]; } for (int i = 0; i < SL-TL+1; i++) { if(s_hash==t_hash) index_list.push_back(i); if(i+TL>a>>b; a%=b; vectorv(b,-1); ll idx=1; ll endidx; ll swidx; ll copy=a; v[a]=0; while(1){ copy*=a; copy%=b; if(v[copy]>=0){ endidx=idx; swidx=v[copy]; break; } else{ v[copy]=idx; } idx++; } string s,t; for (int i = 0; i <=endidx; i++) { s.push_back('a'); t.push_back('a'); } s[endidx]='b'; t[swidx]='b'; cout<