The first line contains two integers(
), indicating the length of the string
and the number of questions.
The second line contains a stringwith length
containing only lowercase English letters.
In each of the nextlines, there are two integers
(
) describing a question.
lines in total, each line should contain only one integer - the answer to the corresponding question.
The index of a string in this problem starts from.
A substring ofcan be obtained by removing zero or more(but not all) characters from the beginning and the end of
.