subject

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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:40
Mary's manager told her she should insert a graphic into her documentwrite mary a brief note describing how to insert a graphicin a word processing document.
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Alex’s family members live in different parts of the world. they would like to discuss the wedding plans of one of their distant relatives. however, alex wants all the family members to talk to each other simultaneously so that they can make decisions quickly. which mode of internet communication should they use? a. blog b. email c. wiki d. message board e. instant messaging
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Write the html code to make a link out of the text “all about puppies”. it should link to a pdf called “puppies.pdf” inside the “documents” folder. the pdf should open in a new window.
Answers: 2
question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. a company is currently focusing on creating specific management goals for itself. which level of maturity is the company demonstrating under the sse_ccm framework? a. performed informally b. planned and tracked c. quantitatively controlled d. well-defined e. continuously improving
Answers: 2
You know the right answer?
Description This programming assignment is to implement a modification of the MAXZONDORCOIN problem...
Questions
question
Arts, 21.05.2021 22:10
question
Mathematics, 21.05.2021 22:10
question
Mathematics, 21.05.2021 22:10
Questions on the website: 13722363