subject
Engineering, 28.11.2019 04:31 moutchyjoseph

Alice owns a shop in elbonia, and she takes great pride in varying the way that she makes change for her customers. she gives them one coin at a time, and tries to give the customers a sequence of coins that she has never used before. it that in elbonia the denominations and names for the coins change every year.
input format the first line of input contains an integer n, 1 < = n < = 20, which indicates the number of coin denominations currently in use. the next line contains n positive integers, each less than 1000, which give the coin denomenations. note that each denomenation will be unique, and there will always be one denomenation equal to 1. the next line gives a value 9, 1 < = q< = 10 which provides the number of coin queries. the following qlines each contain a query in the form of an integer ci, 1 < = c; < = 10%. note: the denominations are not necessary unique. in other words, it is possible that elbonia is using two coins both equal to one. however, one would distinguish sequences based on the type of coin used, not the denomination.
output format for each query, you should output, on a line by itself, the number of distinct sequences of coins that alice can use to make change equal to c; since this number can be very large, you should output the result mod 10° + 7.

ansver
Answers: 3

Another question on Engineering

question
Engineering, 03.07.2019 14:10
When at a point two solid phase changes to one solid phase on cooling then it is known as a) eutectoid point b) eutectic point c) peritectic point d) peritectoid point
Answers: 3
question
Engineering, 03.07.2019 14:10
Line joining liquid phase with liquid and solid phase mixture is known as: a) liquidus b) solidus c) tie line d) none of the mentioned
Answers: 2
question
Engineering, 04.07.2019 18:10
Afull journal bearing has a journal diameter of 27 mm, with a unilateral tolerance of -0.028 mm. the bushing bore has a diameter of 27.028 mm and a unilateral tolerance of 0.04 mm. the l/d ratio is 0.5. the load is 1.3 kn and the journal runs at 1200 rev/min. if the average viscosity is 50 mpa-s, find the minimum film thickness, the power loss, and the side flow for the minimum clearance assembly.
Answers: 1
question
Engineering, 04.07.2019 18:10
Items are similar to the free issue items, but their access is limited. (clo5) a)-bin stock items free issue b)-bin stock controlled issue c)-critical or insurance spares d)-rebuildable spares e)-consumables
Answers: 1
You know the right answer?
Alice owns a shop in elbonia, and she takes great pride in varying the way that she makes change for...
Questions
question
Mathematics, 18.08.2019 19:30
question
Mathematics, 18.08.2019 19:30