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, 04.07.2019 18:10
Courses that are developed by subject matter experts, internal or extemal to the college or university. these programs are marketed by the school (clo2) marks a)-vocational schools b)-vendor training c)-colleges & universities d)-continuing education programs
Answers: 2
question
Engineering, 04.07.2019 18:20
Derive the correction factor formula for conical nozzle i=-(1+ cosa) and calculate the nozzle angle correction factor for a nozzle whose divergence hal-fangle is 13 (hint: assume that all the mass flow originates at the apex of the cone.
Answers: 3
question
Engineering, 04.07.2019 18:20
Find the minimum film thickness for a journal bearing with the data below. shaft diameter, d-50 mm, clearance ratio, cdratio? 0.001, shaft speed, n 2000 rpm; bearing length. i 200 mm; eccentricity ration, ? -0.55. ( note, cdratio-ca/d) the minimum film thickness is um
Answers: 2
question
Engineering, 04.07.2019 18:20
For each of the following process: a) sketch the p-v diagram, b)sketch t-s diagram, c) sketch t-v diagram, d) sketch the boundary work on one of the diagrams (a, b or c) and e) sketch the reversible heat transfer on one of the diagrams (a, b or c): 1- isobaric process from compressed liquid to superheated vapor 2- isothermal process from compressed liquid to superheated vapor 3- isentropic process from compressed liquid to superheated vapor
Answers: 3
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
Computers and Technology, 19.07.2019 05:00
question
Mathematics, 19.07.2019 05:00
Questions on the website: 13722363