Computer Science

Computer Science Warmups

Computer Science Warmups: Level 4 Challenges


Sue is a coordinator for UPS, and she's planning out tomorrow's route. Her next assignment is a truck in New York City, which must make 99 deliveries while driving on the rectangular grid of the city's streets.

If the coordinates the driver must reach are found in this list (measured in block lengths), which of the following is the closest to the minimum distance the truck will need to travel (in blocks)?

Image credit: Chris Hondros/Getty Images North America

In the above passcode, we mark the points 1-5-9-6-3-7.

How many combinations does Android 9 point unlock have?

  • Each pattern must connect at least four dots.
  • The marked points are distinct.
  • Once the point is marked it can not be marked again.
  • You can jump over a marked point, but cannot jump over an unmarked point. For example, at the start we could not jump over the 5. But at the end, we jumped over the 5.

You have in your wallet $300, which you want to spend completely. You decide to spend all of it by buying food from a fancy restaurant with the following menu:

    tofu scramble: $1
    pancakes: $5
    brunch combo: $20
    saffron infused peach tea: $50
    truffles: $100
    caviar: $200

Let OO be the number of different ways that you can spend exactly $300. What are the last 3 digits of OO?

Several vaults were broken into last night! Police have strong evidence to believe that the culprit was the infamous Algorithmic Burglar - an efficient and swift robber.

7 different vaults were robbed. Police discovered that the vaults are missing the following amounts of metal: 1739 lbs, 72 lbs, 212 lbs, 55 lbs, 511 lbs, 1239 lbs, and 99 lbs.

Here are the weights and dollar values for the different bars in the vaults:

Material    Weight  Value
Gold        2 lbs   $57
Platinum    5 lbs   $191
Silver      14 lbs  $417
Expensivium 17 lbs  $231
Rhodium     19 lbs  $741
Osmium      13 lbs  $139
Aluminum    1 lbs   $28
Silicon     3 lbs   $117
Iron        5 lbs   $13
Titanium    11 lbs  $9
Potassium   19 lbs  $18

Before the robbery, each vault contained at least 2000 lbs of each metal. Assume the burglar stole whole bars, not fractions of a bar.

Let V be the greatest possible value in dollars of the stolen material. What are the last three digits of V?

Movie theaters are difficult to manage. Lots of people need to move through limited space, all towards optimal view points, many many times a day! Striking a balance between customer convenience and sufficient revenue is most tricky. For example, right now I'm adding a new chamber to my complex, but I'm not sure how big to make it. The thing about dense seating is that, on the one hand, it generates the most revenue possible from the space I have, but on the other hand, it gets more and more inconvenient for the customers the larger it gets.

Rows in my theater are made of some number of seats, densely packed from the aisle to the wall, thus having only one exit. As such, when someone needs to get up and out, everyone between that person and the aisle is also forced to get up and out - this can get very frustrating for customers in long rows! So, I've done some analysis, and here's what I've come up with:

  • At intermissions, each person in the theater has a 1% chance of needing to get up for something, independent of all other factors. We call these 'the givens'.
  • At the start of the intermission, all of the givens get up, and anyone between a given and the aisle must also get up by proxy. We call these customers 'the forced', and one should note that a single customer may be both a given and a forced.
  • Customer satisfaction remains good so long as no more than 10% of customers have to get up at these intermissions. This includes both the givens, and the forced. (We include the givens as they may be getting up due to discomfort, or some other reason that is also the theater's fault!)
  • Thus, I want to ensure that, for any given intermission, the probability that more than 10% of customers in the theater have to get up is at most 50%.

I can fit 25 rows in my new theater. I want to make the rows as long as possible. How many seats long can I make all these rows, and still meet the customer satisfaction requirements I just outlined? All the rows must be the same size, of course.

Assume the theater is always full, don't worry about empty seats.

You should round down when computing 10% of customers. For a theater with 5 seats per row, 10% of customers = 12, not 13.

Image Credit:

Problem Loading...

Note Loading...

Set Loading...