Hi everyone!
I'm looking for classic problem: Given a string A and Q strings B_1, B_2, .., B_Q. For each i count the number of occurrence of the string B_i in string A.
Can you give me the link to the above problem in some online judge sites. Thanks
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
Hi everyone!
I'm looking for classic problem: Given a string A and Q strings B_1, B_2, .., B_Q. For each i count the number of occurrence of the string B_i in string A.
Can you give me the link to the above problem in some online judge sites. Thanks
Name |
---|
1449 — Dominating Patterns
String Matching
String Multimatching
Take a look at this page: http://www.ahmed-aly.com/Category.jsp?ID=35. The first and fourth problems are a bit simpler than what you described (you just have to answer whether Bi appears in A). The second is similar to them but takes place in a grid. The third is also slightly easier than what you described. I guess you're probably interested in them, though, because the idea is the same — just a small modification.
Anyway, Frequency Count is pretty much equivalent to what you're asking. Finally, I'd like to recommend USACO — Censoring (Gold Division), which is about the same difficulty. It's nice because it forces you to notice something important to avoid receiving TLE in a given testcase.