| acmsguru |
|---|
| Finished |
the given string s as suffix.
. The next line contains an integer m — the number of questions to answer. The next m lines contain two non-empty strings of lowercase English letters each, the first denoting the prefix and the second denoting the suffix. The prefix and suffix are separated with a single space. The total length of all given prefixes plus the total length of all given suffixes doesn't exceed
. sample input | sample output |
3 aaaaa abacabaa avtobus 6 a a a aa aa a aaaaa aaaa abac caba abac a | 2 2 1 1 0 1 |
| Name |
|---|


