ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1158. Censored!

WA 11
Posted by IvanShafran 14 Oct 2014 20:30
If you use Aho-Korasik+DP you should delete forbidden words which contain other forbidden words.
Example:
alphabet = "01"
forbidden words = ["100", "10", "11"] -> forbidden words = ["10", "11"]