CF313B Ilya and Queries
Description
Ilya the Lion wants to help all his friends with passing exams. They need to solve the following problem to pass the IT exam.
You've got string $ s=s_{1}s_{2}...\ s_{n} $ ( $ n $ is the length of the string), consisting only of characters "." and "\#" and $ m $ queries. Each query is described by a pair of integers $ l_{i},r_{i} $ $ (1
Input Format
The first line contains string $ s $ of length $ n $ $ (2
Output Format
Print $ m $ integers — the answers to the queries in the order in which they are given in the input.