Sort by growth
Sort by growth
At the opening ceremony of the Olympics games, as well as at its closing ceremony, the athletes of each country wore the same costumes. Naturally, with so many athletes, coaches and support staff, the process of sewing the Olympic parade uniform for many countries was quite responsible and important, and it is necessary to know the growth of each member in delegation to sew the uniform of appropriate size. The companies that will be engaged in tailoring this uniform are partly lucky, since it is known that none of the members in delegation is shorter than one and a half meters and above two and a half meters.
You have a database with the growth of each member in delegation for the respective kind of sport. Your task is to answer quickly to the queries of next type: how many members in delegation have height in the range from a to b centimeters?
The first line of each query contains one number n (1 ≤ n ≤ 20000) - the number of members in corresponding delegation. The second line contains n integers - the heights of athletes in centimeters. The data are not sorted because were placed in a database at the last moment, and therefore were not processed. The third line contains a query: 2 number - the lower and upper limits of growth, in which the manufacturer is interested.
For each query print the answer on a separate line.
7 153 168 155 167 155 167 155 165 170 6 189 191 169 190 192 191 165 172