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
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
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
Название |
---|
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.