task stringlengths 0 154k | __index_level_0__ int64 0 39.2k |
|---|---|
Smoothie Stand
Description:
Olivia runs a very famous and profitable smoothie stand. On
any given day, she will always sell out (that is, she will sell
as many smoothies as she has ingredients to make), regardless
of what smoothie recipe she offers. Therefore, to simplify
things, she has decided she wi... | 29,800 |
Snake
Description:
The game is played on a grid, and every segment of the
snake’s body occupies one cell. The snake’s head can turn in
three directions, but it cannot go backwards. The body follows
the head. The head may not collide with the body or exit the
grid. Since the entire snake moves at the sa... | 29,801 |
Snakes
Description:
Buffalo Bill wishes to cross a $1000 \times 1000$ square field. A
number of snakes are on the field at various positions, and
each snake can strike a particular distance in any direction.
Can Bill make the trip without being bitten?
Assume that the southwest corner of the field is at
... | 29,802 |
Snakes and Masters
Description:
You and your friends are playing a game of Snakes and
Masters. The goal of the game is to land in a specific square
to win the game. From where you are, it requires $N$ steps to land on the specific
square. Each turn you are allowed to take either one or two
steps. How m... | 29,803 |
Snapper Chain (Easy)
Description:
Note that this is an easier version of the problem
snapperhard
The Snapper is a clever little device that, on one
side, plugs its input plug into an output socket, and, on the
other side, exposes an output socket for plugging in a light or
other device.
When a Snappe... | 29,804 |
Snapper Chain (Hard)
Description:
Note that this is a harder version of the problem
snappereasy
The Snapper is a clever little device that, on one
side, plugs its input plug into an output socket, and, on the
other side, exposes an output socket for plugging in a light or
other device.
When a Snapper... | 29,805 |
Sneak Attack
Description:
You are in a game of laser tag, where the goal is to shoot
and hit other players with the laser gun you are carrying.
Running up to them and shooting sometimes works, but it leaves
you more vulnerable to their counterattack than you would like.
You have found that you can be s... | 29,806 |
Sneaky Exploration
Description:
You have been sent to spy on the city of Galcary. When you
arrive, you realize with shock that the Galcarians are far more
efficient than you first expected. Every pair of buildings in
Galcary are connected by some sequence of roads (roads go
between two buildings), and ... | 29,807 |
Sneaky Mastermind
Description:
Rebecka and Hugo are playing a round of Mastermind, where
Hugo has created a secret code consisting of $N$ coloured pegs. There are
$C$ different colours on
the pegs and Hugo is allowed to use multiple pegs of the same
colour. Rebecka is tasked with trying to find the sec... | 29,808 |
Sneaky Snowninjas
Description:
The honourable ninja Hattori Hanzō has just conducted a
successful assassination of one of the greatest enemies of his
clan and needs to make sneaky getaway. Unfortunately for him,
it has snowed recently and he needs to be careful not to leave
any prints in the snow to av... | 29,809 |
Snjóteppa
Description:
One day Nesi was going to drive to Reykjavík University, but
it had snowed quite a bit. Some cars have gotten stuck in both
lanes of his street and he’s unsure if he can make it out of
the street, even using both lanes and driving against traffic.
Even worse is the fact that cars... | 29,810 |
Snow Way Out
Description:
You were having such a nice day on the slopes, until the
avalanche hit! You’re okay, but your backpack with all your
equipment fell out. Fortunately, you have your tracking device
with you which you can use to find it, but less fortunately, it
was damaged and is low on power. ... | 29,811 |
Snowball Fight
Description:
Back in my day, we were allowed to have
snowball fights during recess. Me and my two friends would
split up, build a fort, and stock it with snowballs. When the
fighting started, we threw snowballs at each other’s forts
until there was one left standing. Those were the days.... | 29,812 |
Snowball Fight 2
Description:
During the IOI competition, Sweden and Finland have snowball
fights against each other. Each fight goes as follows:
* Someone from one of the countries, say Finland, throws a
snowball at the other.
* Sweden then responds by throwing an even bigger
snowball back (in s... | 29,813 |
Snowfall
Description:
The Yraglac cross-country skiing team would like to know if
there will be enough snow on the ground to train after a
certain number of days. They have a weather forecast in an
unconventional format, described in the input section, and
would like you to help them figure out how muc... | 29,814 |
Snóker
Description:
Arnar has been watching snooker recently. Snooker is played
on a large rectangular table and the players use a cue, which
is just a custom made stick. The play area on the table is
$140.5$ inches long and
$70$ inches wide. There
are six pockets on the table, one in each corner a... | 29,815 |
So You Like Your Food Hot?
Description:
Peter is co-owner of the incredibly successful Pete and
Pat’s Pitas and Pizzas and his sales are on fire! But
unfortunately, so is his building, due to carelessly laid
delivery boxes placed too close to Pete’s famous wood burning
pizza oven. After sifting though ... | 29,816 |
So you want to be a 2^n-aire?
Description:
The player starts with a prize of $1, and is asked a
sequence of $n$ questions.
For each question, he may
* quit and keep his prize.
* answer the question. If wrong, he quits with nothing. If
correct, the prize is doubled, and he continues with the
n... | 29,817 |
Social Advertising
Description:
You have decided to start up a new social networking
company. Other existing popular social networks already have
billions of users, so the only way to compete with them is to
include novel features no other networks have.
Your company has decided to market to advertisers a... | 29,818 |
Social Distancing
Description:
You are given a array of $n$ numbers $a_1, a_2, \ldots , a_ n$. We are
trying to safe distance $n$ people by arranging them in a row.
The government has added strange safe distancing rules: when
person $i$ and
$j$ are adjacent, they
should stand $a_{max(i,j)}$ distanc... | 29,819 |
Social Distancing
Description:
It’s time for a social distancing party! A group of friends
are sitting around a circular table where some seats are filled
and some seats are empty. In particular, to maintain social
distancing protocols, no two people are sitting directly beside
each other.
They want t... | 29,820 |
Social Resistance
Description:
In many networks, we need a measure of the closeness of one
node to another. The classic measure is link distance.
If the network is represented as a connected undirected graph
with an edge between any pair of nodes that have a direct link,
the link distance is the number... | 29,821 |
Social running
Description:
You and a few friends are running together once a week
around Lund. You all agree that it is boring and also dangerous
to run on your own rather than running with others. Therefore
you and your friends decide to minimize the distance that
anyone needs to run on their own.
Y... | 29,822 |
Soda Slurper
Description:
Tim is an absolutely obsessive soda drinker, he simply
cannot get enough. Most annoyingly though, he almost never has
any money, so his only obvious legal way to obtain more soda is
to take the money he gets when he recycles empty soda bottles
to buy new ones. In addition to t... | 29,823 |
Soft Passwords
Description:
Your favourite social media website is changing their policy
on login password validation: a slight error when logging in is
now acceptable! In particular, assuming the password you chose
when creating the account is $S$, a password $P$ entered while logging in will be
accep... | 29,824 |
Software Bugs
Description:
Recently, there appeared a promising open-source
initiative called the Bug Preprocessor. The
preprocessor is a program able to find all bugs in your
source code and mark them, so they are relatively easy to
remove. Your task is to write a program that will remove
all mark... | 29,825 |
Sok
Description:
Mirko and Slavko bought a few liters of orange, apple and
pineapple juice. They are now whipping up a non alcoholic
cocktail following a recipe they found on the Internet. Sadly,
they figured out too late that not only you should use recipes
when making cocktails, you should also use t... | 29,826 |
Solar Energy
Description:
You are planning to travel in interstellar space in the hope
of finding habitable planets. You have already identified
$N$ stars that can
recharge your spaceship via its solar panels. The only work
left is to decide the orientation of the spaceship that
maximizes the dista... | 29,827 |
Solnedgång
Description:
You are visiting a very warm country, and it happens to be a
sizzling hot day. Luckily, you managed to find the shadow of a
house to take cover in. You realize that you probably should
head back to the hotel sometime soon, but you also realize that
it’s too hot to walk in the su... | 29,828 |
Solution Pollution
Description:
Mathematics is facing a crisis. There are too many
solutions, and not enough problems! You’ve come up with a new
problem, but if it has too many solutions, it will simply
contribute to the solution pollution! To solve your dilemma,
you must find all of the solutions $x$ ... | 29,829 |
Solving for Carrots
Description:
You will be given the number of contestants in a
hypothetical contest, the number of huffle-puff problems that
people solved in the contest and a description of each
contestant. Now, find the number of carrots that will be handed
out during the contest.
## Input
Input... | 29,830 |
Some Sum
Description:
Your friend has secretly picked $N$ consecutive positive integers
between $1$ and
$100$, and wants you to
guess if their sum is even or odd.
If the sum must be even, output ‘Even’.
If the sum must be odd, output ‘Odd’. If
the sum could be even or could be odd, output ‘Either’... | 29,831 |
Son of Pipe Stream
Description:
Two years ago, you helped install the nation’s very first
Flubber pipe network in your hometown, to great success. Polls
show that everyone loves having their own Flubber dispenser in
their kitchen, and now a few enterprising citizens have
discovered a use for it. Appare... | 29,832 |
Songbook
Description:
Doris will be the toastmaster at a dinner with her
university chapter. During the evening, they will of course be
singing songs! As Doris is quite uninformed of the songs in
their songbook, she has choosen to instead pick as many songs
as possible during the $t$
minutes alloca... | 29,833 |
Soot Sprite Sprinklers
Description:
The latest decree from the Castle in the Sky Homeowners
Association (CSHOA) announces a new regulation where you are
required to water your garden with at least $w$ gallons of water between every
inspection, which comes around every $p$ minutes. You already have a
wo... | 29,834 |
Sopsug
Description:
Grushög is an unfinished residential area in the outskirts
of Lund. Right now, all necessary infrastructure is being
constructed, including the most important thing of all: garbage
disposal. Like in many areas of Sweden, a sopsug (automated vacuum collection system) will
be used to ... | 29,835 |
Sort
Description:
Mirko is a great code breaker. He knows any cipher in the
world can be broken by frequency analysis. He has completely
the wrong idea what frequency analysis is, however.
He intercepted an enemy message. The message consists of
$N$ numbers, smaller than
or equal to $C$. Mirko
bel... | 29,836 |
Sort Two Numbers
Description:
In this problem, your program should read two whole numbers
(also called integers) from the input, and print them out in
increasing order.
As a refresher, here are some ways to read two numbers from
standard input in a few different languages:
```
# Python 3
line = input()
a... | 29,837 |
Sort of Sorting
Description:
Can you believe school has already started? It seems like we
were just finishing last semester. Last semester was tough
because the administration had a hard time keeping records of
all the students in order, which slowed everything down. This
year, they are going to be on ... | 29,838 |
Soundex
Description:
Soundex coding groups together words that appear to sound
alike based on their spelling. For example, “can” and “khawn”,
“con” and “gone” would be equivalent under Soundex coding.
Soundex coding involves translating each word into a series
of digits in which each digit represents a le... | 29,839 |
Soylent
Description:
Yraglac recently decided to try out Soylent, a meal
replacement drink designed to meet all nutritional requirements
for an average adult. Soylent not only tastes great but is also
low-cost, which is important for Yraglac as he is currently on
a budget. Each bottle provides $400$ ca... | 29,840 |
Space Alignment
Description:
You are collaborating with a few other programmers on a
coding project. To your horror, you discover that some people
have been using tabs to indent code while other people have
been using spaces to indent code within the same file.
Apparently these people didn’t notice tha... | 29,841 |
Space Elevator
Description:
After years of material science research, scientists have
finally devised a material strong enough to support the
long-conceived space elevator! This elevator is anchored to the
Earth in geostationary orbit to support efficient vertical
transportation through Earth’s gravity... | 29,842 |
Space Junk
Description:
For this problem, we will consider the simplified case in
which both the spacecraft and the space junk can be modelled as
spheres that are travelling in a straight line. Given the
current locations of the two spheres as well as their
velocities, when would they collide in the fu... | 29,843 |
Space Mail
Description:
You are a space postal carrier. Your job is to deliver
parcels in your spaceship to every planet in your postal
district. The number of parcels you can deliver depends on how
much fuel you need to carry in your ship in order to jump from
planet to planet while on your delivery r... | 29,844 |
Space Probe
Description:
The space probe is out of control! It’s going to start its
measurement sequence sometime between two given times
$t_1$ and $t_2$ (measured in seconds), but we
don’t know when. We do know that all possible start times
$t \in [t_1, t_2]$ are
equally probable.
The measurement... | 29,845 |
Space Race
Description:
Anthony and his friends have been arguing among themselves
on who has the better space-car. They decided to settle on
having a competition on an alien planet to finally settle who
has the best space-car. This alien planet is unique as it has
no atmosphere, thereby removing air r... | 29,846 |
Space Walls
Description:
Place-Y Technology Corp. plans to launch a new space station
soon. The company CEO is known for being obsessed with
perfection. For example, he insists that all the outer surfaces
of the space station are regularly polished and cleaned of what
he calls “space debris,” mainly fo... | 29,847 |
Spaghetti
Description:
Early languages like Fortran IV use conditional and
unconditional goto statements instead of structured
statements like if and while. In Fortran IV,
each statement occupies a line of input. The first five
positions in each line are reserved for an optional label,
which is an ... | 29,848 |
Spaghetti Cutting
Description:
After you’ve cooked and served a delicious spaghetti
bolognese, your younger sibling exclaims: ”This spaghetti is
too long! I will only eat strands that are $A$ micrometers or shorter!”.
The dish has $N$
strands, each $B$
micrometers long. To satisfy your sibling, you wi... | 29,849 |
Spam Filter
Description:
Goo is working in a well-known Slovak antivirus company
which unfortunately cannot be named. In addition to antivirus
software, they are developing a spam filter. Recently, Goo has
made a few improvements to the filter and he wants to
demonstrate his progress to his boss. As yo... | 29,850 |
Sparkle's Seven
Description:
In the wake of King Sombra’s siege on Equestria, Princess
Celestia and Princess Luna have solicited the help of Shining
Armor—Twilight Sparkle’s older brother—to ramp up the defenses
of Canterlot Castle. Now, they have asked of Twilight to
assemble a squad and try to break ... | 29,851 |
Spavanac
Description:
Every school morning Mirko is woken up by the sound of his
alarm clock. Since he is a bit forgetful, quite often he leaves
the alarm on on Saturday morning too. That’s not too bad
though, since he feels good when he realizes he doesn’t have to
get up from his warm and cozy bed.
H... | 29,852 |
Speaking of Which
Description:
Your friend Edvin was going to tell you his password to his
favourite website, so that you could check out how awesome it
is. Edvin is sure that nobody but him and you speak
the Robber Language, so he encrypted it using this simple
technique, and wrote it down on a note. ... | 29,853 |
Special Cycle
Description:
You are given a simple undirected graph with no self-loops
or multiple edges. Some of the edges are marked as
Special.
Your task is to find a simple cycle where, for each
Special edge, that edge either belongs to the cycle or
neither of its endpoints touch the cycle. The cyc... | 29,854 |
Special Tour
Description:
* The tour has length at least two
* All squares in the grid are visited exactly once
* Let $a_1, \dots ,
a_{NM}$ be the sequence of visited squares. Then
$d(a_ k$, $a_{k+1}) = 2$ or $3$ for every $1 \leq k < NM$. Also,
$d(a_{NM}, a_1) = 2$
or $3$.
Here, $d(p... | 29,855 |
Speed Limit
Description:
Bill and Ted are taking a road trip. But the odometer in
their car is broken, so they don’t know how many miles they
have driven. Fortunately, Bill has a working stopwatch, so they
can record their speed and the total time they have driven.
Unfortunately, their record keeping s... | 29,856 |
Speeding
Description:
You’d like to figure out whether a car was speeding while it
was driving down a straight road. Unfortunately, you don’t have
any radar guns or related instruments for measuring speed
directly; all you have are photographs taken of the car at
various checkpoints on the road at vari... | 29,857 |
Speedrun
Description:
You aspire to become a top Minecraft survival speedrunner.
So, you need to come up with a strategy to do every necessary
task quickly and efficiently. After watching a lot of previous
world record speedruns, you noticed that the first day is the
most crucial.
You need to finish a... | 29,858 |
Speedrunning
Description:
Mario has recently discovered that the physics engine has
gotten an update: he can now run faster when he’s in Small
Mario form. This has caused quite the headache for
speedrunners.
For simplicity, we consider the level to be a $1\times N$ grid of tiles. Mario
starts at the f... | 29,859 |
Speedy Escape
Description:
The Newton brothers are planning to rob a bank in the city
of Alviso and want to figure out a way to escape the city’s
only police car. They know that their car is faster than the
police car so if they could just reach one of the highways
exiting the city they will be able to... | 29,860 |
Speedy Slopes
Description:
Wally has spent a wonderful day hitting the slopes at
Whirlwind Ridge, a new ski hill with an interesting twist,
they’ve put directional “boost tracks" along some of the
slopes, allowing skiers to quickly race to neighbouring slopes.
Additionally they’ve recently become known... | 29,861 |
Spelling Bee
Description:
The New York Times publishes a daily puzzle called the
“Spelling Bee.” In this puzzle, $7$ letters are shown in a hexagonal
arrangement of $6$ letters
around a center letter. The task is to come up with as many
words as possible that
* contain only letters that are displayed ... | 29,862 |
Sperhling
Description:
On her spare time Caitlin loves to do speed typing.
Unfortunately Caitlyn was never good at spelling. So what often
happens is that Catelin makes a mistake spelling a word, and
has to go back and fix her typo. One word in particular that
Caitlynn has a hard time spelling is the w... | 29,863 |
Spider Walk
Description:
When Charlotte has finished a late-night feasting in the
center and wants to retreat to some corner, she walks to the
edge on autopilot. To do this, she picks a starting strand, and
walks along it until she meets the first bridge on that strand.
She will cross the bridge and go... | 29,864 |
Spiderman's Workout
Description:
Staying fit is important for every super hero, and Spiderman
is no exception. Every day he undertakes a climbing exercise in
which he climbs a certain distance, rests for a minute, then
climbs again, rests again, and so on. The exercise is described
by a sequence of dis... | 29,865 |
Spidey Distance
Description:
Consider a 2D plane of points with integer coordinates. The
Taxi-cab Distance between two points is a measure of
the shortest path between the points where movement is
restricted to only horizontal and vertical paths, similar to
following the lines on traditional graph pape... | 29,866 |
Spilahlustun
Description:
Jörmunrekur’s wallet has gotten frightfully light towards
the end of his studies, so he is looking for creative ways to
fix that problem. After taking a course in probability theory
he knows that most betting games played with a deck of cards
will not be in his favour unless h... | 29,867 |
Spin Doctor
Description:
As an employee of the world’s most respected political
polling corporation, you must take complex, real-world issues
and simplify them down to a few numbers. It isn’t always easy.
A big election is coming up and, at the request of
Candidate X, you have just finished polling $n$... | 29,868 |
Spinning Up Palindromes
Description:
“Vandalism, perhaps. Nothing’s actually been damaged.”
responded Robert Lackey, the chief accountant.
Both were staring up at the large counter suspended above
the factory floor, a counter that had faithfully recorded the
number of widgets that had come off the assembl... | 29,869 |
Splat
Description:
The artist Jackson Pollock used to create works of art by,
among other things, dripping paint onto the canvas. He died in
1956, but, if he were alive today, he would probably appreciate
some computational help in planning out his masterpieces.
We start with a large, white canvas. We let... | 29,870 |
Split Decisions
Description:
A Split Decisions puzzle is a type of crossword in which
each across and down answer is a pair of words instead of a
single word (as in standard crossword puzzles). Each pair of
words are identical except in exactly two adjacent positions
for which letters have been provide... | 29,871 |
Split It!
Description:
Carol is preparing a Split It tournament.
Split It is a turn-based line-drawing game,
played by two players on a piece of paper. On each turn a
player draws a horizontal or vertical line segment that starts
at a point with integer coordinates on an existing line segment
and e... | 29,872 |
Splitstream
Description:
* A split node takes a sequence of
numbers as input and distributes them alternatingly to its
two outputs. The first number goes to output $1$, the second to output
$2$, the third to
output $1$, the fourth
to output $2$, and so
on, in this order.... | 29,873 |
Splitting Pairs
Description:
Alice and Bob are playing a modified game of Nim. Initially,
there are some non-empty piles of stones in front of them. They
take turns, and Alice takes the first turn.
On a single turn, a player must do the following actions in
order:
* Remove some number of piles of stones ... | 29,874 |
Spock
Description:
Leo is participating in a friendly game of
rock-paper-scissors-lizard-Spock against his computer.
The game proceeds in rounds. In each round, Leo and his
computer both choose, simultaneously, between five options:
rock, paper, scissors, lizard, and Spock. Each of these five
optio... | 29,875 |
Springoalla
Description:
Springoalla loves to run. She knows of $n$ running trails and knows the exact
time it would take her to run the trail start to finish. The
first time she runs a trail, she familiarizes herself with it.
More specifically, she memorizes where in the track the
half-way point is. D... | 29,876 |
Spritt
Description:
## Input
The first line of the input contains two integers
$n$ ($1 \leq n \leq 10^6$), the number of
classrooms at Reykjavík University, and $x$ ($1
\leq x \leq 10^8)$, how many bottles of sanitizer are
available.
Then there are $n$
lines, one for each classroom, where the $i$... | 29,877 |
Sprocket Science
Description:
The sprockets of the front derailleur are connected to the
pedals and drive the rear sprockets by chain. You recall from
Sprocket Science $101$
that a cyclist uses derailleurs to select any combination of
front and rear sprocket. The resulting gear ratio is
$u/v$ where... | 29,878 |
Square Bounce
Description:
Given a square in the plane with corners at $(-1,-1)$, $(-1,1)$, $(1,1)$ and $(1,-1)$, we fire a ray from point
$(-1,0)$ into the interior
of the square on a path with a given slope. The ray bounces off
of the sides of the square with an angle of reflection which is
the same ... | 29,879 |
Square Deal
Description:
Given the dimensions of three rectangles, determine if all
three can be glued together, touching just on the edges, to
form a square. You may rotate the rectangles. For example,
Figure 1 shows successful constructions for the first two
sample inputs.
## Input
The input consis... | 29,880 |
Square Fields (Easy)
Description:
Note that this is an easier version of the problem
squarefieldshard.
You are given $n$
points in the plane. You are asked to cover these points with
$k$ squares. The squares
must all be the same size, and their edges must all be parallel
to the coordinate axes. A ... | 29,881 |
Square Fields (Hard)
Description:
Note that this is a harder version of the problem
squarefieldseasy.
You are given $n$
points in the plane. You are asked to cover these points with
$k$ squares. The squares
must all be the same size, and their edges must all be parallel
to the coordinate axes. A p... | 29,882 |
Square Peg
Description:
You know the old saying: You can’t fit a square peg in a
round hole!
Well, obviously you can if the hole is big enough. I guess
you can’t fit a square peg into a round hole that is
sufficiently small.
Given the side length $L$ of a square peg and the radius
$R$ of a circular h... | 29,883 |
Square Peg in a Round Hole
Description:
Mr. Johnson likes to build houses. In fact, he likes it so
much that he has built a lot of houses that he has not yet
placed on plots. He has recently acquired $N$ circular plots. The city
government has decided that there can be only one house on each
plot, and ... | 29,884 |
Square Pie
Description:
You are working on an OCR (Optical Character Recognition)
application to convert scanned images into text format. In
addition to just being able to parse text, you plan to have
your software recognize graphs and transcribe them in a
meaningful way. Having already handled histogr... | 29,885 |
Square Rooms
Description:
Bob Roberts is an archaeologist who specializes in the
buildings of an ancient race known as the Erauqs. This ancient
race was known not only for the fabulous treasures they amassed
over the years, but also for the peculiar room layouts of their
buildings. Their buildings were... | 29,886 |
Square of Triangles
Description:
You are given the squares of the lengths of the sides of
four triangles. Determine if it is possible to arrange them
(via translation, rotation, and reflection) into a square. No
triangles may overlap, and there should be no gaps or
holes.
## Input
The first line of i... | 29,887 |
Squawk Virus
Description:
Oh no! Hackers are threatening to shut down Twitface, the
premier social networking site. By taking advantage of lax
security protocols, nefarious cyber-bandits have developed a
virus that spreads from user to user, amplifying over time and
eventually bringing the network to i... | 29,888 |
Squirdle
Description:
Squirtle has come up with a word game called Squirdle. In
the game, Squirtle thinks of a $5-$letter string (where each letter
is a distinct lowercase English letter
a-z). Squirtle gives you $10$ guesses to figure out his word,
and after each guess he will tell you whether each cha... | 29,889 |
Srednji
Description:
Consider a sequence $A$
of integers, containing $N$ integers between $1$ and $N$. Each integer appears exactly once
in the sequence.
A subsequence of $A$ is
a sequence obtained by removing some (possibly none) numbers
from the beginning of $A$,
and then from the end of $A$.
C... | 29,890 |
Sretan
Description:
Digits $4$ and
$7$ are lucky, while all
others are unlucky. An integer is lucky if it contains only
lucky digits in decimal notation. We would like to know the
$K$-th lucky positive
integer.
## Input
The first and only line of input contains a positive integer
$K$ ($1 \le ... | 29,891 |
Stable Table
Description:
Avant-garde carpenter Mort S. Tenon specializes in
assembling furniture out of odd-shaped pieces of wood. Using
strong glue and cleverly-hidden weights and floor anchors,
Tenon can make tables that appear to defy gravity, as shown in
Figure b. He begins by creating a rectangul... | 29,892 |
Stack Construction
Description:
Strangely, the only way to post messages is using an
on-board stack. You can push a character onto the top of the
stack, you can pop the character that is on top of the stack,
and you can print the character that is on top of the
stack..
Out of boredom, or perhaps the u... | 29,893 |
Stack Machine
Description:
A mathematician observes one person get on a bus. Then two
people get off the bus. The mathematician says: “If one more
person gets on the bus, the bus will be empty.”
A stack machine is a special kind of bus. It only has doors
at the front, and it is so narrow that the people o... | 29,894 |
Stacking Cups
Description:
For instance, for a red cup with a radius of $5$ units, your module will receive
either “red 5” or “10 red” message.
Given a list of messages from the core routine, each
describing a different cup, can you put the cups in order of
the smallest to the largest?
## Input
The firs... | 29,895 |
Stacking Curvy Blocks
Description:
You’re doing some construction work, and, to save money,
you’re using some discount, “irregular” construction materials.
In particular, you have some blocks that are mostly
rectangular, but with one edge that’s curvy. As illustrated
below, you’re going to use these ir... | 29,896 |
Stacking Plates
Description:
The Plate Shipping Company is an Internet retailer that, as
their name suggests, exclusively sells plates. They pride
themselves in offering the widest selection of dinner plates in
the universe from a large number of manufacturers.
In a recent cost analysis the company has di... | 29,897 |
Stacking Up
Description:
Stacy has recently started work at Stacks“R”Us, a leading
manufacturer of stack-related products such as children’s
blocks, pancake spatulas, and dining hall tray dispensers. As a
brand new employee, she has been tasked with testing the latest
product in Stacks“R”Us’s line of a... | 29,898 |
Stafsetning
Description:
Benni really wanted to help with the preparation of
Forritunarkeppni Framhaldsskólanna so he decided to write a few
problems. Benni wrote $n$
problems in total, but in the $i$-th problem he made $s_i$ typos.
Unnar is a total grammar nerd and thus double checks the
grammar and ... | 29,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.