Computers and Technology

Description This programming assignment is to implement a modification of the MAXZONDORCOIN problem on the previous assignment. In this case you have • coins of denominations dı, d2, ..., dn • a target value T where all denominations are distinct and you have 5 coins of each denomination Write code that will determine the maximum number of coins that will add up to the target value T exactly). You may write your program in either Java, Python, C, or C++. 2 Input Format The input will be a text file. The the first line has integers n and m, where n is the number of coins and m is the number of target values T to be tested. After the first line are n lines containing a single integer, the denomination of each coin. These numbers will be distinct. After these there will be m lines of a single integer T, each to be tested against the coin set given in the first n lines. 3 8 3 7 11 = = 3 21 22 72 104 105 106 20 5 127 137 149 157 167 179 191 197 211 227 233 241 257 269 277 283 307 313 331 347 6666 7777 8888 10001 20002 OUTPUT SAMPLES inSample. txt: target: 0, max coins: 0 target: 3, max coins: 1 target: 21, max coins: 3 target: 22, max coins: 6 target: 72, max coins: 12 target: 104, not possible target: 105, max coins: 15 target: 106, not possible inTest1.txt: target: 10000, not possible target: 11000, max coins: 10 target: 11001, not possible target: 11002, max coins: 10 target: 11003, not possible target: 11111, max coins: 11 target: 15000, max coins: 14 target: 16789, max coins: 17 inTest2.txt: target: 6666, max coins: 40 target: 7777, max coins: 45 target: 8888, max coins: 50 target: 10001, max coins: 55 target: 20002, max coins: 90

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 00:00, dubouuu
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
image
Computers and Technology, 23.06.2019 16:00, cravens511peeelg
An english teacher would like to divide 8 boys and 10 girls into groups, each with the same combination of boys and girls and nobody left out. what is the greatest number of groups that can be formed?
Answers: 2
image
Computers and Technology, 23.06.2019 18:20, Blossom824
What is wi-fi infrastructure? a metropolitan area network that uses radio signals to transmit and receive data a communications technology aimed at providing high-speed wireless data over metropolitan area networks a means by which portable devices can connect wirelessly to a local area network, using access points that send and receive data via radio waves includes the inner workings of a wi-fi service or utility, including the signal transmitters, towers, or poles and additional equipment required to send out a wi-fi signal
Answers: 2
image
Computers and Technology, 24.06.2019 10:00, wwwcarolynzouowficz
3. what do the terms multipotentialite, polymath, or scanner mean?
Answers: 2
Do you know the correct answer?
Description This programming assignment is to implement a modification of the MAXZONDORCOIN problem...

Questions in other subjects: