好儿郎-志在四方 2015-11-06 11:59 采纳率: 100%
浏览 1749
已采纳

ACM程序设计题,看不懂,请教一下各位

Censor

frog 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.
Input

The 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)
Output

For each test, write 1 string which denotes the censored text.
Sample Input

abc
aaabcbc
b
bbb
abc
ab

Sample Output
a
ab

//以上是题目,本人英语差,看到题目后,感觉题目要求是:给出一个敏感字符串A,然后在输入一个字符串B,在B中如果包含A串,就删去,
但是Sample Input
abc
aaabcbc
b
bbb
abc
ab

Sample Output
a
ab
他给的这个示例输入和输出是什么意思啊,看不懂,
希望大牛能够解答,感激不尽,

  • 写回答

3条回答 默认 最新

  • 懒懒的好男人 2015-11-09 03:25
    关注

    不知道你明白了没有,题目意思是 有多重输入,每个有两行,第一行是w,第二行是p,将在p中出现的w删除,将删除完的p继续执行这个动作,直到不能删除为止

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料