Aho Corasick + DP