1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
makvit [3.9K]
2 years ago
14

Adam is so good at playing arcade games that he will win at every game he plays. One fine day as he was walking on the street, h

e discovers an arcade store that pays real cash for every game that the player wins - however, the store will only pay out once per game. The store has some games for which they will pay winners, and each game has its own completion time and payout rate. Thrilled at the prospect of earning money for his talent, Adam walked into the store only to realize that the store closes in 2 hours (exactly 120 minutes). Knowing that he cannot play all the games in that time, he decides to pick the games that maximize his earnings
Sample game board at the arcade GAME COMPLETION TIME (in minutes) PAYOUT RATE Pac-man 90 400 Mortal Kombat 10 30 Super Tetris 25 100 Pump it Up 10 40 Street Fighter II 90 450 Speed Racer 10 40
An acceptable solution is the one where it still picks the best earnings even when the list of games or completion times or payout rates change.
Question:
Write code in Java/Scala/Python to help Adam pick the sequence(s) of games that earn him the most money?.
Then, assume you have a variable list of games and their payout rates. What is the best way to pick the games that earn you the most?
Input Explanation
The first line of input is always an integer denoting many lines to read after the first line. In our sample test case, we have 6 in the first line and 6 lines after the first line, each having a game, completion_time and payout_rate.
In each data line, the game, completion_time and payout_rate are separated by a ','(comma).
The games board may change but the store still closes in 120 minutes.
Input
6
Pac-man,80,400
Mortal Kombat,10,30
Super Tetris,25,100
Pump it Up,10,40
Street Fighter II,90,450
Speed Racer,10,40
Output Explanation
Print the game names that earn him the most into the standard output in alphabetical order
Output
Mortal Kombat
Pump it Up
Speed Racer
Street Fighter II
Computers and Technology
1 answer:
ohaa [14]2 years ago
3 0

Answer:

ask it to ur teacher boiiiiii

You might be interested in
A network administrator has been given a network of 172.16.85.0/21 and wants to know the usable range of IP addresses on that su
viktelen [127]

Answer:

The correct answer to the following question will be option C.

172.16.80.1-172.16.87.254

Explanation:

IP Address: IP Address stands for Internet Protocol Address, a unique numerical label allotted to every computer network that are connected to the network of the computer and communicate through the internet protocol.

  • An IP address can be separated by periods and having four numbers that are called Octet. Range of IP address can be from 0 to 255.
  • We have to keep the first 21 bits and start setting all from the 22nd bit on to 0 (zero).
  • To get the suitable and the correct range of the address, we add and subtract 1 from the given broadcast address i.e.,172.16.85.0/21.

So, option C is the right answer and no other option is usable according to the given explanation and the address given by the administrator.

3 0
3 years ago
Which of the following statements about personality are true? Check all of the boxes that apply.
kupik [55]

Answer:

- personallity is an individual's unique combination of attitudes, behaviors, and characteristics.

-(maybe)Being aware of personality characteristics helps people identify their natural abilities and determine  potential careers.

Explanation:

hope helped

7 0
3 years ago
fill in the balenkes ) 1)there are ................................... function keys on the keybord 2)pressing the end key moves
Doss [256]

Answer:

1.) There are 12 function keys 2.) The return Key

Explanation:

6 0
3 years ago
During a user’s onboarding process, many designers focus on a gradual release of information. This process is called what?
mrs_skeptik [129]

progressive disclosure

3 0
2 years ago
What are the qualities of different products that caught your eye and encourage you to buy them​
Ivan

Answer:

The qualities of different products that caught your eye and encourage you to buy them​ is described below in detail.

Explanation:

A fantastic method to do this would be to practice shiny colors in any advertisement you publish. This is an old method, but it's a great one. Glowing orange, for example, is sure to hold watching much higher than bland shades like gray. Play throughout here, and apply the color you think illustrates the eye most.

8 0
3 years ago
Other questions:
  • You can put a small level on your camera to help keep the horizons straight? TRUE OR FALSE
    14·2 answers
  • To add color to the entire background of a page, users will select the ___ feature?
    14·1 answer
  • Plz help ASAP
    10·1 answer
  • Because Microsoft Access includes not only the software needed to create a database, but also the software needed to create form
    7·1 answer
  • What are the pros and cons of the internet’s ability to access information
    8·2 answers
  • 1 Point
    14·1 answer
  • Intranets:
    8·1 answer
  • Design a for loop that gets 6 integer numbers from a user, accumulates the total of them, then displays the accumulated total to
    9·1 answer
  • Write a pseudocode that receives a positive number from the user, and then,
    14·1 answer
  • A system engineer enhances the security of a network by adding firewalls to both the external network and the internal company n
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!