「一本通 2.2 练习 4」Censoring
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
Original source: USACO 2015 Feb. Silver
Given two strings and , repeatedly find a substring in from front to back, delete it, and fill the gap by shifting the remaining characters forward. Repeat this process until no longer contains as a substring. Output the final string .
Input Format
The first line contains a string , and the second line contains a string .
Output Format
Output the processed string .
Sample 1
whatthemomooofun
moo
whatthefun
Constraints & Hints
For all test cases, , and it is guaranteed that the strings consist only of lowercase letters.
20251123 D班作业(7)
- Status
- Done
- Problem
- 2
- Open Since
- 2025-11-24 0:00
- Deadline
- 2025-12-1 23:59
- Extension
- 24 hour(s)