Thanks_up每次敲完代码以后都会休息,你可以在附近的手办店里面找到他哦~~~~
和很多程序猿一样,Thanks_up很喜欢看动漫,而且他很喜欢收藏手办Thanks_up尤其喜欢Ultraman的手办
这种手办在城市都很多商店都可以买到,据了解在第i个商店的价格是xi个硬币
Thanks_up打算连续几天都去买他最喜欢的手办(这是真的有钱),已知他会在第i天花mi个硬币
现在他想要知道他每天可在多少家商店买到他喜欢的手办
The first line of the input contains a single integer n (1 ≤ n ≤ 100 000) — the number of shops in the city that sell Vasiliy's favourite drink.
The second line contains n integers xi (1 ≤ xi ≤ 100 000) — prices of the bottles of the drink in the i-th shop.
The third line contains a single integer q (1 ≤ q ≤ 100 000) — the number of days Vasiliy plans to buy the drink.
Then follow q lines each containing one integer mi (1 ≤ mi ≤ 109) — the number of coins Vasiliy can spent on the i-th day.
第一行输入一个整数n (1 ≤ n ≤ 100 000) ,代表有多少个商店有Thanks_up喜欢的手办
第二行输入n个整数xi (1 ≤ xi ≤ 100 000) ,代表第i个商店里面手办的价格
第三行输入一个整数q (1 ≤ q ≤ 100 000) ,代表Thanks_up打算买手办的天数
接下来有q行,每行输入一个整数mi (1 ≤ mi ≤ 109),代表Thanks_up在第i天打算花的硬币数量
Print q integers. The i-th of them should be equal to the number of shops where Vasiliy will be able to buy a bottle of the drink on the i-th day.
输出一个 整数q,代表在第i天,Thanks_up能够买到手办的商店数量
5
3 10 8 6 11
4
1
10
3
11
0
4
1
5NoteOn the first day, Vasiliy won't be able to buy a drink in any of the shops.第一天,Thanks_up不能在任何商店买到手办
On the second day, Vasiliy can buy a drink in the shops 1, 2, 3 and 4.第二天Thanks_up可以在第1,2,3,4家买到手办
On the third day, Vasiliy can buy a drink only in the shop number 1.第三天Thanks_up可以在第一家商店买到手办
Finally, on the last day Vasiliy can buy a drink in any shop.最后一天Thanks_up可以在任意商店买到手办