Problem C
Another Substring Query Problem
You are given a string
Each query consists of a string
Input
The first line of input contains a single string
The next line of input contains a single integer
Each of the next
Output
Output a single integer, which is the position of the start
of the
Sample Input 1 | Sample Output 1 |
---|---|
abacabadabacaba 4 a 7 e 3 bac 2 abada 1 |
13 -1 10 5 |