一部之内可以多次调用统一规则!
for (int i = 1; i <= len; i++){ int pos = s.find(a[i]); while (pos != string::npos){ s = s.substr(0, pos) + b[i] + s.substr(pos + a[i].length(), s.size()); q.push(s); st.push(step + 1); s = tmp; pos = s.find(a[i], pos + 1); } }