13275 - DS_2021_Practice   

Description

Given a sorted list with distinct numbers, please find out the index of request numbers.

Input

Fisrt line: a positive number N. It means the number of elements in the given sorted list. 1<N<=200000

Second line: N integer numbers from small to large. It means the sorted list.

Following lines: Each line is a request number in the above sorted list. You should output the index of the request number in the sorted list.

Output

For each requst number, output the index of it.

Sample Input  Download

Sample Output  Download

Tags




Discuss