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, he 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

Answers

Answer 1

Answer:

ask it to ur teacher boiiiiii


Related Questions

public class Main{ public static void main(String [] args){ String name=WelcomeJava; Runnable r1=() -> System.out.println(name); String name1 = name.toUpperCase(); Runnable r2=() -> System.out.println(name1); r1.run(); } }
What is the output of the above program?

Answers

Answer:

Concept: Programming

You take a string as an input, and you output the result which is a user defined name.Then you take that name and turn all the strings to uppercase in name and return that result.Rate brainlist

The output of the given program is,

''WelcomeJava''

Given program is,

public class Main {

   public static void main(String[] args) {

       String name = "WelcomeJava";

       Runnable r1 = () -> System.out.println(name);

       String name1 = name.toUpperCase();

       Runnable r2 = () -> System.out.println(name1);

       r1.run();

   }

}

Now, This program defines a class called Main, with a main method as the entry point.

It declares a String variable name with the value "WelcomeJava".

Then, it creates a Runnable r1 that prints the value of the name when executed.

Next, it converts the name to uppercase and assigns the result to name1.

Finally, it creates another Runnable r2 that prints the value of name1 when executed.

In the main method, r1 is called using the run method, resulting in the output "WelcomeJava".

Read more about Python programs at:

brainly.com/question/26497128

#SPJ4

It is said that Wifi repeater is not good as a rumor

Answers

True your welcome bue

A hacker successfully modified the sale price of items purchased through your company's web site. During the investigation that followed, the security analyst has verified the web server, and the Oracle database was not compromised directly. The analyst also found no attacks that could have caused this during their log verification of the Intrusion Detection System (IDS). What is the most likely method that the attacker used to change the sale price of the items purchased

Answers

Answer:

By modifying the hidden form values that is in a local copy of the company web page

Explanation:

In a situation were the hacker successful change the price of the items he/she purchased through the web site of the company's in which the company web server as well as the company Oracle database were not compromised directly which means that the most likely method in which the attacker used to modified the sale price of the items he/she purchased was by modifying the HIDDEN FORM VALUE that was in the local copy of the company web page making it easy for the HIDDEN FORM VALUE to be vulnerable to the hacker because the hidden form value did not store the company server side information or data but only store the company software state information which is why HIDDEN FORM VALUE should not be trusted.

what is bullk email software​

Answers

Bull email software is a software that is used to send emails in large quantities

Hope this helps

This is similar to the last problem, except that the first number on a line is an ID number that identifies an account. The same ID number may appear on any number of lines. Use a Dictionary to accumulate, for each ID, the sum of all the numbers that are on all the lines with that ID number. Call the input file id_data.txt. Write an output file called ID_sums.txt. On each line of the output fille, print an ID number and the sum. Sort the lines by the numerical order of the IDs

Answers

Answer:

Following are the code to this question:

def getSum(ID):#defining a method getSum that accept an ID

   t= 0#defining a variable t

   while ID!= 0:#defining while loop to check ID not equal to 0

       t+= ID % 10# holding remainder value

       ID = ID // 10#holding quotient value

   return t#return total value

def readRecord(S):#defining a method readRecord that hold list  

   f_Read = open("idInfo.txt","r")#defining a variable f_Read to open file

   for C_ID in f_Read:#defining for loop to hold file value  

       C_ID = C_ID.replace('\n', '')#use replace method

       S[C_ID] = getSum(int(C_ID))#use list to method value

   f_Read.close()#close file

def sortRecord(ID_List, t_List):#defining a sortRecord

   for x in range(len(ID_List) - 1):#defining for loop to calculate the length of list  

       for y in range(0, len(ID_List) - x - 1):#defining for loop to calculate the length of list

           if ID_List[y] > ID_List[y+1]:#defining if block to check value is greater

               ID_List[y], ID_List[y+1] = ID_List[y+1], ID_List[y]#swap the value

               t_List[y], t_List[y+1] = t_List[y+1], t_List[y]#swap the value

def showReport(ID, t):#defining a method showReport that accept id and t

   for i in range(len(ID)):#defining for loop to hold index value

       print(ID[i]," ",t[i])#print index value

def writeRecord(ID_List, t_List):#defining a method writeRecord that accept two list

   f_Write = open("idSorted.txt","w")#defining a variable f_Write to hold store value in file

   for i in range(len(ID_List)):#defining a for loop to store value with index

       f_Write.write(ID_List[i])#hold list value

       f_Write.write(" ")    #for space

       f_Write.write(str(t_List[i]) + "\n")# add index value

   f_Write.close()#close file

def run():#defining method run

   S = {}#defining an empty list

   readRecord(S)#passing list into readRecord method

   ID_List = list(S.keys())#defining a variable that holds key value in list

   t_List = list(S.values())#defining a variable that holds values value in list

   sortRecord(ID_List, t_List)#calling a method sortRecord by passing value

   showReport(ID_List, t_List)#calling a method showReport by passing value

   writeRecord(ID_List, t_List)#calling a method writeRecord by passing value

if "run":

   run()

Output:

Please find the attached file.

Explanation:

In the above program code, 6 method getSum, readRecord, sortRecord,showReport, writeRecord, and run method is defined, in which getSum and readRecord is used a single list store value in parameters, and in other methods, it accepts two parameter to store value in key and values form and use a txt file to store and take value.    

In the run method, an empty list s is declared, that pass into the variable ID_List and t_List, and call the method, in this program two a text file "idInfo.txt" is used, that holds some value in the file, and create another file that is "idSorted.txt", in this file it stores the value in the numerical order of the ID's.

1. Write an if statement that assigns 20 to the variable y, and assigns 40 to the variable z
2. Write an if statement that assigns 10 to the variable b, and 50 to the variable c if the
3. Write an if-else statement that assigns 0 to the variable b if the variable a is less
than 10. Otherwise, it should assign 99 to the variable b.
Has and how does it work?
Algorithm Workbench
of the variable x is greater than 100.
variable a is equal to 100.​

Answers

Answer:

if x > 100:

   y = 20

   z = 40

Explanation:

For this exercise, you are going to write a recursive function that counts down to a Blastoff!
Your recursive function will not actually print. It will return a String that can be printed from the main function. Each recursive call will add on to that string.
In your main function, prompt the user for a starting value, then print the results.
Sample Output
Please enter a number to start:
5
5 4 3 2 1 Blastoff!
import java.util.Scanner;
public class Countdown
{
public static void main(String[] args)
{
// Start here
}
public static String countdown(int number)
{
// Base case - return Blastoff!
// Recursive call
}
}

Answers

Answer:

import java.util.Scanner;

public class Countdown {

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

int n;

System.out.print("Please enter a number to start: ");

n = input.nextInt();

System.out.print(countdown(n));

}

public static String countdown(int number) {

if(number>0) {     return " "+number+countdown(number-1);    }

   else    {        return " Blastoff!";    }

}

}

Explanation:

The main method begins here

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

This declares an integer variable n

int n;

This prompts user for a number

System.out.print("Please enter a number to start: ");

This gets user input n

n = input.nextInt();

This calls the countdown function

System.out.print(countdown(n));

}

The countdown function begins here

public static String countdown(int number) {

This is the base case where input number is greater than 0

if(number>0) {     return " "+number+countdown(number-1);    }

This ends the recursion

   else    {        return " Blastoff!";    }

}

4.8 Code Practice: Question 1
I need help

Answers

for x in range(5,76,5):

   print(x, end=" ")

I wrote my code in python 3.8. Hope this helps

Page
U what is a common language that computers use
to talk with one another on- a network?
a. client b. Adapter
c. protocol d. operating
System​

Answers

I think it’s protocol
The computers use a set of protocols. Therefore, the answer is C. Protocol. I hope this helps.

As you draw a star, pressing the shift key while you drag increases the number of points on the star. True or false

Answers

Answer:

true

Explanation:

Benjamin took a photo that focused on certain part of an image while blurring out the rest. What is this effect called?
A.
alternate focus
B.
major focus
C.
minor focus
D.
selective focus

Answers

Answer:

(D) selective focus

Explanation: hope this helps!

Answer:

D. Selective Focus

Explanation:

Photographers commonly use the tilt-shift effect to focus on a certain part of the image while blurring the rest of the photograph. They refer to this as selective focus.

Which retouching action is unethical?

A.

removing a person from a photograph intended for publication in a newspaper

B.

removing the saturation in a photograph intended as a magazine cover page

C.

adding extra lighting on subject’s face and body in a photograph meant for display in an exhibition

D.

changing the color of the subject’s hair in a photograph intended for use in an advertising campaign

Answers

Answer:

B.) removing the saturation in a photograph intended as a magazine cover page

Answer:

its A for Plato

Explanation:Trust me i got it right

Amanda would like to add text to a slide in her presentation. Select all of the correct methods she can use to add text.
Select "Text" from the Insert menu.

Click in the Task pane and enter text.

Draw a text box, click in it, and enter text.

Click in a placeholder and enter text.

PLEASE help

Answers

Answer:

Draw a text box

Explanation:

Because if she draw it she can edit and write what she want

The advancement of technology in our daily lives has changed how we interact with the world.

Answers

i agree. i think there’s less communication, more anger, mental issues.

Which of the following apertures will give you the shallowest depth of field?
a)2.8
b)5.6
c)11
d)22
e)2
50 points and brainliest

Answers

Answer:

a.2.8

The f-stops work as inverse values, such that a small f/number (say f/2.8) corresponds to a larger or wider aperture size, which results in a shallow depth of field; conversely a large f/number (say f/16) results in a smaller or narrower aperture size and therefore a deeper depth of field.

What is a commonly used software access restriction for a computer system connected to other networks such as the internet?
a.Passwords
b. Firewall
c. encryption
d. biometric systems

Answers

Answer:

firewall

Explanation:

Write a program that declares three one-dimensional arraysnamed miles, gallons, and mpg. Each array should be declared in main() and should becapable of holding ten double-precision numbers. The numbers that should be stored in miles are240.5, 300, 189.6, 310.6, 280.7, 206.9, 199.4, 160.3, 177.4, and 192.3. The numbers should bestored in gallons are 10.3, 15.6, 8.7, 14, 16.3, 15.7, 14.9, 10.7, 8.3, and 8.4.

Answers

Answer:

#include <iostream>

using namespace std;

int main(){

   double miles[10] = {240.5, 300, 189.6, 310.6, 280.7, 206.9, 199.4, 160.3, 177.4, 192.3};

   double gallons[10] = {10.3, 15.6, 8.7, 14, 16.3, 15.7, 14.9, 10.7, 8.3, 8.4};

   double mpg[10];

   for (int i = 0; i < 10; i++){

       mpg[i] = miles[i]/ gallons[i];

       cout << "mpg: " << mpg[i] << endl;

   }

}

Explanation:

The C++ source code declares three arrays miles, gallons and mpg with an array length of 10. The gallons and miles arrays are assigned 10 array items each and they are used to push values to the mpg array in the for loop statement. The result of each item in the mpg array is displayed on the screen.

Ryan is a manager who maintains an official record of the events that happen in his company. At the end of the day, he writes about the events that took place. The words that he frequently mentions in his record are today, client, and meeting. The moment he types the first two letter of these words, they appear as a suggestion. Which feature of the word processing program makes these suggestions

Answers

Answer: word completion

Explanation:

Answer:

Word Completion

Explanation: because i took the test.

Most slide layouts include at least one ________ by default.
Question 2 options:

placeholder

action button

transition

animation

Answers

Hey

I think that the answer placeholder :)

Sry if im wrong tho

Answer:

The answer is placeholder.

Janet needs to flag a message for follow-up in Outlook. Which option is not a default?

Today
Tomorrow
Next Week
Next Tuesday

Answers

Answer:

Explanation:

Today

Answer:

Next tuesday.

Explanation: Its to specific

I WILL MARK BRAINLEST FOR THAT FIRST ANSWEr that is CORRECT!!!!!!!!!!!!
Which option lists the correct steps to apply a style?

1 Select the text, click the Home tab, and in the Styles Gallery, click to select a style to apply.
2 Select the text, click the Insert tab, and in the Formatting Gallery, click to select a style to apply.
3 Select the text, click the Home tab, and in the Font group, select a font, font size, and type to apply.
3 All of the options listed above are correct.

Answers

Answer:

Explanation:

Maybe all of the options listed above are correct

2or3 I would reckon hope this helps

Below is an ERD showing the 1:M relationship between Department and Employee entity types. This relationship is modeled as a Department JSON object as:Department: deptID,deptName,deptRoom,{deptPhone},{employee: empID, empName,empPhone,{empEmail}}Where {} indicates multi-valued.Part 1: Open the mydb database we created earlier and create a new department table with two fields:documentid (as an integer field) Jsondocument (as a JSON field)And add around 3 departments and each with 2 or 3 employees.Part 2: Use SQL to answer the following questions:Q1: Select all the records in the table.Q2: List the department names with their phones.Q3: A query to show the deptName and number of employees of the department.Q4: A query to show all the employees of a department of your choice using deptName as criteria.USE MYSQL

Answers

Answer:

hi

Explanation:

Name the application used for creating Presentations___
1.MS PowerPoint
2.MS Word
3MS Excel

Answers

Keynote is great for presentation

Answer:

1.MS PowerPoint

What is cybercrime?
Describe some of the various cybercrimes?
What are the laws that govern cybercrimes?
What can we do to prevent being a victim?

Remember to provide examples.

Answers

Answer:

criminal activities carried out by means of computers or the internet is known as cyber crime.

The U.S. military's standard for computer security is known as
DCS-3000.
TEMPEST.
Daubert standard.
Carnivore.

Answers

Answer:

TEMPEST.

Explanation:

TEMPEST is an acronym for Telecommunications Electronics Materials Protected from Emanating Spurious Transmissions and it is a secret (classified) project of the government of the United States of America that originated with its military in the 1960s based on the study of security with respect to telecommunication devices emitting Electromagnetic Radiation (EMR).

Hence, the U.S. military standard for computer security is known as TEMPEST.

The main purpose of the Telecommunications Electronics Materials Protected from Emanating Spurious Transmissions (TEMPEST) is to prevent the theft, compromise or interception of informations that are being transmitted on various telecommunications devices through the use of Electromagnetic Radiation (EMR).

Factor 72y+108z

lmk the answer asap

Answers

36(2y+3z)

This is the answer , please mark brainliest if correct.

Suppose a switch is built using a computer work station and that it can forward packets at a rate of 500,000 packets per second, regardless (within limits) of size. Assume the workstation uses direct memory access (DMA) to move data in and out of its main memory, which has a bandwidth of 2 Gbps, and that the I/O bus has a bandwidth of 1 Gbps. At what packet size would the bus bandwidth become the limiting factor

Answers

Answer:

When the transmission exceeds 667 packets

Explanation:

In computer networking, a packet is a chunk of data transmitted across the network. The packet size of an Ethernet network is 1.5kilobytes, while the packet size of an IP packet payload is 64 kilobytes.

A switch is a physical network device that connects nodes or workstations while communicating the packets (or frames). The I/O bus size bandwidth is 1Gbps which allows approximately 667 packets. Once this packet size is crossed, the bus becomes a limiting factor or bottle neck.

PLS HELP ME!! WILL GIVE BRAINLIEST

Read the following block of CSS code, and then answer the question.


body

{

position: relative;

left: 50px;

top: 50px;

}


What effect would this code have on the display of a box?

All content would be placed 50 pixels to the left of the current box.

The current box would be located 50 pixels to the left of the page border.

The current box would be located 50 pixels to the left of the next page element.

The current box would be located 50 pixels to the left of the first textual element.

Answers

B i think sorry if I’m wrong

Answer:

it is maybe:

A.  All content would be placed 50 pixels to the left of the current box.

Explanation:

Proper answer=brainliest

Answers

Answer:

hehe

Explanation:

David bought 5.2 pounds of oranges for $1.20 per pound . how much did david spend ..................................................... explain to me how you did it

Answers

Answer:

David spent $6.24.

Explanation:

5.2 times 1.2

Other Questions
Computer user support Is another narme for:A. Customer service B. Technical supportC. Network supportD. Information security Is it true or false please help me its a test I need to turn it in !!!!!!!!! A major difference between the North and the South was a)The South was needed slaves for the cotton fields and the North needed slaves for their factories. b)The North was becoming industrialized, while the South remained agrarian (farm-based). c)The North's climate didn't allow cotton to be produced, so they didn't have slaves. Based on the text, which word BEST describes the culture of the Nebraska prairie where Elizabeth andJames live?A. cooperativeB. unreservedC. frugalD. spiritual There are 40 questions in a test and you get 75 % correct. How many questions do you get right? use the diagram below to find the lengths of the following answer question 18-25. Be sure to include all necessary work. Leave your answer in the simplest radical form when necessary. Which graph represents the function f(x)=2.4? A green line, frayed at the end where he broke it, two heavier lines, and a fine black thread still crimped from the strain and snap when it broke and he got away. Like medals with their ribbons frayed and wavering, a five-haired beard of wisdom trailing from his aching jaw. Which best describes the effect of the poem's word choice on its meaning? A. The speaker explains why the fish has "a five-haired beard" hanging to suggest how silly it must look. B. The speaker describes the "aching jaw" to make the reader empathize with the fish instead of the person. C. The speaker compares the broken fishing lines to "medals" to show that the fish's survival is a triumph. Find the slope of the line passing through the points (3, 4) and (8,-3). HELP WILL GIVE BRANLIEST!!! If anyone has read the novel The Hate You Give give me 3 reasons why the Carter family should move out of Garden Heights! Which provide evidence for the general theory of relativity? Check all that applygravitational lensingthe constancy of the speed of lightthe curvature of space-timechanges in Mercury's orbital pathO gravitational redshift Brooke has scores of 84, 72, 90, 95, and 87 on her first five quizzes. After taking the sixth quiz, Brooke's mean score increased. Which could be Brooke's sixth quiz score? Select three options. 85 90 83 86 92 all right guys help me out a little bit no jokes this is worth 13 points I need help with 432 / 73 Which statements describe the key features of the graph of ? Check all that apply.The graph has a y-intercept at 2.The graph has an x-intercept at 6.The graph has a vertical asymptote at x = 3.The graph has a vertical asymptote at x = 3.The graph has a horizontal asymptote at y = 1. The New Slide command on the Ribbon lets you choose ________.Question 3 options:slide dimensionsprint settingsslide layoutstransitions Siempre estoy conectada a la_____encontrar la informacinLa redasignaturaseguir A truck is traveling at 27 m/s down the interstate highway where you are changing a flat tire. frequency of 185 Hz. A) What frequency do you hear? B) Suppose after fixing the flat you were driving your car at 22 m/s the truck drives blows his horn again. What frequency do you hear? (Speed of sound in air is 340 mis). Isabelle is plotted a pentagon on a grid. So far, she has plotted and connected the three points shown on the grid below. To complete the pentagon, she can choose only from the points below.(2.0) (-2,0), (-2, 4), (2, 4)How can Isabelle complete her pentagon?Connect the point already at (0-2) to a new point at (2.0), and then connect(2.0) to (-2,4)Connect the point already at (0-2) to a new point at (-2, 0), and then connect (-2, 0) to (-2. 4).Connect the point already at (0-2) to a new point at (-2, 0), connect (-2, 0) to (24), and then connect (2,4)to (-2.4)Connect the point already at (0-2) to a new point at (2.0), connect(20) to (2.4) and then connect (2.4) to (-2. 4)Mark this and retumSave and ExitNexSubC How did the cultural achievements of Tang China influence East Asia?Tang establishment of social services created a political model for other societies.Tang art inspired Japanese artists who borrowed elements and methods of design.Tang attention to art left them vulnerable and unprepared for the Mongol invasion. Tang completion of the Grand Canal increased the exchange of ideas between societies. Plz, Help me with this question!!!!