subject
Computers and Technology, 24.08.2021 02:10 bay97

A boy goes to buy video games from a shop. The shop contains N unique video games. The prices of the games are given in the form of an array A. The price of ith games is A[i]. Now the boy has q queries, in each query he wants to know the number of unique games that have a price less than the given amount M. Input: The first line contains an integer N total number of unique video games available in the shop.

The second line contains N space-separated integers (the price of the games).

The third line contains Q number of queries.

Each of the next Q lines contains integer M. Output:

For each query output number of games having price less than M for that query. Sample Input:

5
1 4 10 5 6
4
2
3
5
11
Output for the sample input:

1
1
2
5

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:10
When copying and pasting text, the first step is move your cursor type the text select the copy command select the paste command
Answers: 2
question
Computers and Technology, 24.06.2019 15:30
If you want to delete an entire word at a time, which key should you press along with the backspace or delete key?
Answers: 1
question
Computers and Technology, 25.06.2019 06:30
How can u permanently delete a picture from your camera ?
Answers: 1
question
Computers and Technology, 25.06.2019 16:30
In which field of information technology do it professionals work directly with other employees to solve their general technology related issues?
Answers: 1
You know the right answer?
A boy goes to buy video games from a shop. The shop contains N unique video games. The prices of the...
Questions
question
Social Studies, 03.10.2019 11:00
question
Mathematics, 03.10.2019 11:00
question
Mathematics, 03.10.2019 11:00
question
Computers and Technology, 03.10.2019 11:00