PEG 11/12 Programming Test 1 - October 19
FurWear is running out of oxygen!
After an emergency meeting between the Oelfinn and FurWear, and the ingestion of Earth-imported beer, the Oelfinn have decided to contract FurWear to perform analysis on their most recent census data (which now includes Oelfinn living on other planets). The Oelfinn wish to find how old the th youngest Oelfinn is.
Due to their abnormally long lifespans and quirky reproductive cycles, it is guaranteed that no two Oelfinn will be the same age.
Input Specification
The first line consists of a single integer , the number of live Oelfinn. The following lines each contain a single integer , the age of the th Oelfinn (in millennia). The next line consists of a single integer , the number of queries to follow. The following lines each contain a single integer , the th query.
Output Specification
Output the correct answer to each query in the order given, on separate lines.
Sample Input
10
42
23
15
52
63
24
73
54
66
10
3
1
5
10
Sample Output
10
42
73
Comments