好儿郎-志在四方 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 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 路易威登官网 里边的参数逆向
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?
  • ¥50 需求一个up主付费课程
  • ¥20 模型在y分布之外的数据上预测能力不好如何解决
  • ¥15 processing提取音乐节奏