Editing
2015 Feb Bronze Problem 1 Censoring (Bronze)
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Problem == In the problem titled 'Censoring (Bronze)' from the USACO 2015 February Contest, the farmer John is trying to write a book but there is a specific word, let's call it T, that he finds displeasing and wants to remove from his text. John has already written a word S. Every time word T appears in S as a consecutive substring, John deletes it. This process continues until there are no occurrences of T in S. You are to help John decide what the final version of S will be after all deletions are made. === Input === The input consists of two lines. The first line contains the initial word S (1 β€ |S| β€ 1,000,000), composed of lowercase letters, and the second line contains the displeasing word T (1 β€ |T| β€ 100), also composed of lowercase letters. === Output === The output should be a single line containing the final version of S after all deletions have been made.
Summary:
Please note that all contributions to Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
My wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information