题面:
For example, if t=bababa and s1=ba , s2=aba , you can get t=bababa , t=bababa or t=bababa in one step.
You want to color all the letters of the text t in red. When you color a letter in red again, it stays red.
In the example above, three steps are enough:
- Let's color t[2…4]=s2=aba in red, we get t=bababa ;
- Let's color t[1…2]=s1=ba in red, we get t=bababa ;
- Let's color t[4…6]=s2=aba in red, we get t=bababa .
正确题面:
For example, if t=bababa and s1=ba , s2=aba , you can get t=bababa , t=bababa or t=bababa in one step.
You want to color all the letters of the text t in red. When you color a letter in red again, it stays red.
In the example above, three steps are enough:
- Let's color t[2…4]=s2=aba in red, we get t=bababa ;
- Let's color t[1…2]=s1=ba in red, we get t=bababa ;
- Let's color t[4…6]=s2=aba in red, we get t=bababa .
翻译已经通过翻译途径提交。