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 10:30
Aconstruction company is creating a powerpoint presentation describing how they calculate costs during each construction step. they plan to email this presentation to clients. the individual clients will be watching the presentation slide show on their own personal computers. what is the most important formatting step the company should take to make the text readable and pleasing to the eye?
Answers: 2
question
Computers and Technology, 22.06.2019 22:00
During physical science class ben and jerry connected three identical lightbulbs in parallel to a battery where happens when ben removes one of the lightbulbs from it’s socket
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
question
Computers and Technology, 23.06.2019 18:40
Johnson enterprises uses a computer to handle its sales invoices. lately, business has been so good that it takes an extra 3 hours per night, plus every third saturday, to keep up with the volume of sales invoices. management is considering updating its computer with a faster model that would eliminate all of the overtime processing.
Answers: 2
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
Mathematics, 30.11.2020 17:40
Questions on the website: 13722360