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, 21.06.2019 22:30
What are compression artifacts? 1) visible defects in the picture caused by the nature of the compression algorithm. 2) numbers that tell a web server how much to compress a picture for faster transmission. 3) invisible defects in the picture preserved by lossless compression. 4) numbers that tell a photo editing program how much to compress a picture for faster transmission.
Answers: 3
question
Computers and Technology, 22.06.2019 11:00
The isometric projection camera technique provides an illusion of perspective by using things like parallax scrolling to create the illusion of 3d in a 2d game
Answers: 3
question
Computers and Technology, 23.06.2019 04:31
Which of the following is not a way in which trees benefit the environment? a. they remove a significant amount of carbon dioxide from the atmosphere. b. they remove a significant amount of oxygen from the atmosphere. c. their roots hold soil in place, reducing rates of erosion. d. they remove ozone and particulates from the atmosphere. select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. andy received a potentially infected email that was advertising products. andy is at risk of which type of security threat? a. spoofing b. sniffing c. spamming d. phishing e. typo-squatting
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, 12.11.2020 22:30
Questions on the website: 13722359