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, 23.06.2019 00:30
Quic which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
question
Computers and Technology, 23.06.2019 01:40
You have a linux system that has a 1000gb hard disk drive, which has a 90gb partition containing an ext4 filesystem mounted to the / directory and a 4gb swap partition. currently, this linux system is only used by a few users for storing small files; however, the department manager wants to upgrade this system and use it to run a database application that will be used by 100 users. the database application and the associated data will take up over 200gb of hard disk space. in addition, these 100 users will store their personal files on the hard disk of the system. each user must have a maximum of 5gb of storage space. the department manager has made it very clear that this system must not exhibit any downtime as a result of hard disk errors. how much hard disk space will you require, and what partitions would you need to ensure that the system will perform as needed? where would these partitions be mounted? what quotas would you implement? what commands would you need to run and what entries to /etc/fstab would you need to create? justify your answers.
Answers: 3
question
Computers and Technology, 23.06.2019 10:50
The volume v and paper surface area a of a conical paper cup are given by where r is the radius of the base of the cone and h is the height of the cone. a. by eliminating h, obtain the expression for a as a function of r and v. b. create a user-de ned function that accepts r as the only argument and computes a for a given value of v. declare v to be global within the function. c. for v ! 10 in.3 , use the function with the fminbnd function to compute the value of r that minimizes the area a. what is the corresponding value of the height h? investigate the sensitivity of the solution by plotting v versus r. how much can r vary about its optimal value before the area increases 10 percent above its minimum value?
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
You know the right answer?
Description This programming assignment is to implement a modification of the MAXZONDORCOIN problem...
Questions
question
Arts, 05.12.2020 03:10
question
Physics, 05.12.2020 03:20
Questions on the website: 13722363