问题描述
- ACM程序设计题,看不懂,请教一下各位
-
Censorfrog is now a editor to censor so-called sensitive words (敏感词).
She has a long text p. Her job is relatively simple -- just to find the first occurence of sensitive word w and remove it.
frog repeats over and over again. Help her do the tedious work.
InputThe input consists of multiple tests. For each test:
The first line contains 1 string w. The second line contains 1 string p.
(1≤length of w,p≤5?106, w,p consists of only lowercase letter)
OutputFor each test, write 1 string which denotes the censored text.
Sample Inputabc aaabcbc b bbb abc ab
Sample Output
a
ab//以上是题目,本人英语差,看到题目后,感觉题目要求是:给出一个敏感字符串A,然后在输入一个字符串B,在B中如果包含A串,就删去,
但是Sample Input
abc
aaabcbc
b
bbb
abc
abSample Output
a
ab
他给的这个示例输入和输出是什么意思啊,看不懂,
希望大牛能够解答,感激不尽,
解决方案
不知道你明白了没有,题目意思是 有多重输入,每个有两行,第一行是w,第二行是p,将在p中出现的w删除,将删除完的p继续执行这个动作,直到不能删除为止
解决方案二:
真真正正在线等,麻烦各位了
解决方案三:
好像有点明白示例的意思了,他是给了三对输入输出吧
b
bbb
这一对去掉敏感词就是空白了,应该是这样吧??