task stringlengths 0 154k | __index_level_0__ int64 0 39.2k |
|---|---|
Shibuya Crossing
Description:
The Shibuya scramble crossing in Tokyo is infamous for being
heavily used, resulting in people bumping into each other. The
crossing can be modeled as a convex polygon, where the
$n$ people about to cross
initially stand at a point that is on the perimeter of the
polyg... | 29,700 |
Ship Traffic
Description:
Ferries crossing the Strait of Gibraltar from Morocco to
Spain must carefully navigate to avoid the heavy ship traffic
along the strait. Write a program to help ferry captains find
the largest gaps in strait traffic for a safe crossing.
Your program will use a simple model as fol... | 29,701 |
Shiritori
Description:
The Japanese game of Shiritori is the perfect 2-player game
for a long car ride. The rules are simple: the first player
picks any word to say, then the second player must choose a new
word that begins with the last letter of the word that the
first player just said. Then it is th... | 29,702 |
Shoot-out
Description:
This is back in the Wild West where everybody is fighting
everybody. In particular, there are $n$ cowboys, each with a revolver.
These are rather civilized cowboys, so they have decided to
take turns firing their guns until only one is left standing.
Each of them has a given prob... | 29,703 |
Shopaholic
Description:
Lindsay is a shopaholic. Whenever there is a discount of the
kind where you can buy three items and only pay for two, she
goes completely mad and feels a need to buy all items in the
store. You have given up on curing her for this disease, but
try to limit its effect on her wall... | 29,704 |
Shopping
Description:
You have just moved into a new apartment and have a long
list of items you need to buy. Unfortunately, to buy this many
items requires going to many different stores. You would like
to minimize the amount of driving necessary to buy all the
items you need.
Your city is organized ... | 29,705 |
Shopping Bags
Description:
As usual, you forgot your reusable shopping bags at home. I
guess you have to buy some paper bags. You only have two items
on your shopping list, but you need to stock up on a certain
quantity of each item since you are planing to throw a party.
Each item has a size and the p... | 29,706 |
Shopping List
Description:
Kelly, being the great programmer that she is, is frequently
thinking of “the next big thing” for apps. One morning Kelly
thought of the brilliant idea to create a social network for
grocery shopping lists. Kelly wants to make her social network
connect people that buy the sa... | 29,707 |
Shopping List (Easy)
Description:
Kelly, being the great programmer that she is, is frequently
thinking of “the next big thing” for apps. One morning Kelly
thought of the brilliant idea to create a social network for
grocery shopping lists. Kelly wants to make her social network
connect people that buy... | 29,708 |
Shopping Malls
Description:
We want to create a smartphone application to help visitors
of a shopping mall and you have to calculate the shortest path
between pairs of locations in the mall. Given the current
location of the visitor and his destination, the application
will show the shortest walking pa... | 29,709 |
Shopping Plan
Description:
You have a list of items you need to buy today, and you know
the locations (represented as points on a cartesian grid) of a
few stores in the area. You also know which of these stores are
selling each item on your list, and at what price each store
sells it. Given the price o... | 29,710 |
Short Sell
Description:
Simone is learning to trade crypto currencies. Right now,
she is looking into a new currency called
CryptoKattis. A CryptoKattis can be used to improve
your Kattis ranklist score without having to solve
problems.
Simone, unlike most competitive programmers, is very
percepti... | 29,711 |
Shortest Composite Sum
Description:
Given a positive integer $N$, find a shortest sequence of
composite numbers of length at least $2$ that sums to $N$.
## Input
The first line contains an integer $N$ ($2
\le N \le 10^{18}$). It is guaranteed that $N$ can be written as the sum of at
least $2$ composite
... | 29,712 |
Shortest Flight Path
Description:
Commercial flights are statistically quite safe (in terms of
number of deaths per passenger-kilometer, only going to the
moon is safer). But there are still reasons for precautions and
safety regulations. An early such rule was the so-called
“60-minute rule,” which req... | 29,713 |
Shortest Missing Subsequences
Description:
Given a string $s$ we
say that string $t$ is a
Subsequence of $s$ if $t$ can be obtained from $s$ by deleting zero or more
characters of $s$. Note
that $t$ is not
necessarily a substring of $s$—that is, $t$ is not necessarily contiguous in
$s$, but the... | 29,714 |
Shortlex
Description:
The set of all binary strings of finite length, denoted
$\{ 0,1\} ^*$, plays an
important role in computer science, and it is often useful to
impose an ordering on the elements of this set. One option is
standard lexicographic order (dictionary order with
the convention that $... | 29,715 |
Shotcube
Description:
Namco Bandai’s video game ‘Tales of Graces’ introduces a
puzzle minigame known as Shotcube. In this game, you have
$9$ cubes placed on a
$7$-by-$7$ square grid. The objective is to
rearrange the cubes so that they all lie in a $3$-by-$3$ square. In the video game, this
$3$-by-... | 29,716 |
Shovelling Snow
Description:
Note that this is an easier version of the problem
shovelling.
Anna, Bengt, Christian and Diana are four good friends
living in a slightly desolate place called Sweden just north of
Denmark. These four friends like to visit each other as often
as possible. During the summe... | 29,717 |
Shovelling Snow
Description:
Anna, Bengt, Christian and Diana are four good friends
living in a slightly desolate place called Sweden just north of
Denmark. These four friends like to visit each other as often
as possible. During the summers, going from any of the four
friends’ houses to another is an ... | 29,718 |
Shrine Maintenance
Description:
A religious sect has holy sites with shrines placed around a
circle of radius 1000. The circle is split into $N$ equal length arcs and the
endpoints are numbered in order, 1 through $N$. The first figure shows a circle
where $N$ is 12, with 12
gray tick marks like on a 1... | 29,719 |
Shuffle
Description:
You are listening to your music collection using the shuffle
function to keep the music surprising. You assume that the
shuffle algorithm of your music player makes a random
permutation of the songs in the playlist and plays the songs in
that order until all songs have been played.... | 29,720 |
Shuffles
Description:
The most common technique for shuffling a deck of cards is
called the Riffle or Dovetail shuffle. The deck is split into
two stacks, which are then interleaved with each other. The
deck can be split anywhere, and the two stacks can be
interleaved in any way.
For example, consider... | 29,721 |
Shuffling Along
Description:
Most of you have played card games (and if you haven’t, why
not???) in which the deck of cards is randomized by shuffling
it one or more times.
A perfect shuffle is a type of shuffle where the
initial deck is divided exactly in half, and the two halves are
perfectly inter... | 29,722 |
Sibice
Description:
Young Mirko threw matches all over the floor of his
room.
His mom did not like that and ordered him to put all the
matches in a box. Mirko soon noticed that not all of the
matches on the floor fit in the box, so he decided to take the
matches that don’t fit and throw them in the ne... | 29,723 |
Sideways Sorting
Description:
We are so accustomed to reading strings from left to right,
it can be a little difficult to think of strings that go right
to left or even vertically. Here’s your chance to get some
practice.
## Input
Input consists of up to $100$ test cases. Each test case
starts with a... | 29,724 |
Sierpiński Circumference
Description:
Polish mathematician Wacław Sierpiński (1882-1969)
described the 2D geometric figure known as the
Sierpiński triangle as part of his work on set theory in
1915. The triangle, which is really an infinite collection of
points, can be constructed by the following algo... | 29,725 |
Siffrid's Digit Sum
Description:
Siffrid loves playing with numbers! Right now, she is
playing with the integer $N$.
She wonders how to create the smallest and largest number
that have the same digit sum and number of digits as
$N$. Can you help her?
The digit sum of a number is defined as the sum of all... | 29,726 |
Siggi sement
Description:
Siggi works for the city, filling in potholes most days. One
day he sees an unusually large hole in the road in the
outskirts of Reykjavík. The residents there are quite impatient
and want this fixed immediately.
Siggi measures the hole and sees it is exactly $K$ units in size. H... | 29,727 |
Sightseeing Tour
Description:
The city executive board in Lund wants to construct a
sightseeing tour by bus in Lund, so that tourists can see every
corner of the beautiful city. They want to construct the tour
so that every street in the city is visited exactly once. The
bus should also start and end a... | 29,728 |
Sign Profile
Description:
Consider a polynomial $f(x)$ like the one plotted below. For
sufficiently small (large negative magnitude) values of
$x$, the function
$f(x)$ has a negative
value. As $x$ gets larger
(more positive), $f(x)$
become positive, then negative again, then positive again. We
... | 29,729 |
Silueta
Description:
The main hero of this task, painter Vincent, spent a great
deal of his youth travelling the world. Sights from numerous
voyages have often been the inspiration for his, nowadays
highly praised, works of art. On one occasion, Vincent found
himself in a metropolis full of skyscrapers... | 29,730 |
Silver Star Stands Alone
Description:
One of standard units of length used in Solar system
distance measurements is one astronomical unit, abbreviated as
AU. It is also used in the following problem.
The exploration probe is being assembled on Mars and it will
be launched soon. The probe destination is an... | 29,731 |
Sim
Description:
This problem is an extension of another Kattis problem -
backspace. In that problem, every time we see a character
‘<’, it actually means that the ‘Backspace’ key is
pressed and we undo the last character that was just
typed.
The extension is as follows: Now, pressing a ‘<’
(the ‘... | 29,732 |
Similar Spacing
Description:
Finally, your dream of owning a restaurant chain has come
true! You have consulted a marketing firm and received
instructions on how to best place your restaurants in the
city.
The firm has identified potential restaurant sites along a
single road, each of which can house ... | 29,733 |
Simon Says
Description:
Simon says is a game where one player is Simon, and the rest
have to do what he says, but only if he starts his command with
the words “simon says”. If you fail to perform the command, you
lose. If you perform the command when he didn’t start with
those magic words, you also los... | 29,734 |
Simon Says
Description:
In the game “Simon Says” one person plays the role of Simon,
who gives instructions to everyone else playing the game. The
tricky part is that if Simon begins his instruction with “Simon
says” then everyone else must follow the instruction
(or they lose the game); if Simon gives... | 29,735 |
Simon the Spider
Description:
Simon the Spider ate many insects this summer and got fat.
The threads of his web will soon be too thin to carry him and
so he needs to reinforce them. Since fat spiders are also lazy,
Simon wants to use as little material as possible — well, you
know that spiders have to ... | 29,736 |
Simone
Description:
blue red blue green blue blue
green
The sequence stops. Now you repeat it.
Consider the following generalization Simone of
this classic game. In Simone, a sequence of lights of
$K$ different colours will
flash; the player must memorize this sequence and play it back.
Simone... | 29,737 |
Simple Addition
Description:
Yup, yet another trivial problem. You just have to add two
integers! Oh, not easy enough? Sure, let’s say that they’re
positive as well. Now it should be trivial, right?
## Input
The input consists of two lines, each containing a positive
integer less than $10^{10\,
000}$... | 29,738 |
Simple Arithmetic
Description:
You are given three integers $a, b, c$ ($1 \le a, b, c \le 10^9$). Compute
$a \cdot b / c$, with an
absolute precision of $10^{-6}$.
## Input
The first and only line of input contains the three integers
$a, b, c$ separated by a
single space.
## Output
Output a single ... | 29,739 |
Simple Cron Spec
Description:
A Cron Spec is used by Linux to specify when to
repeatedly execute a certain job. For this problem, consider a
Simple Cron Spec that defines when a job needs to be
run within a single day. A Simple Cron Spec has three
space separated tokens:
that specify at which hours/mi... | 29,740 |
Simple Factoring
Description:
Ms. Alice was working on making some factoring homework for
her students last week, where the students get questions in the
form of $ax^2+bx+c$, and
must rewrite the expression in the form $(dx+ e)(fx + g)$, where $a,b,c,d,e,f,g$ are integers. She is
done making the questi... | 29,741 |
Simple Polygon
Description:
Write a program that constructs a polygon from a given set
of points in the plane. Each point of the set has to be a
vertex of the polygon, and the polygon must not have any other
vertices. No two line segments of the polygon may have any
point in common, except for the midd... | 29,742 |
Simple Polygon
Description:
A polygon $P$
determined by points $p_1, p_2,
\ldots , p_ n$ is a closed chain of line segments
(called edges) $p_1 p_2, p_2 p_3,
\ldots , p_ n p_1$ in the plane. Polygon $P$ is simple, if no two edges have
any points in common, with the obvious exception of two
cons... | 29,743 |
Simple Solitaire
Description:
There are many different varieties of solitaire (card games
for one), but most require an area where you can lay out cards.
Here’s one you can do by simply holding the deck in your
hand.
The game uses a standard $52$ card deck where each card has one
of $4$ suits – spades... | 29,744 |
Simplicity
Description:
For a string of letters, define the Simplicity of the string to be the number of
distinct letters in the string. For example, the string
string has simplicity $6$, and the string letter has simplicity $4$.
You like strings which have simplicity either $1$ or $2$. Your friend has given ... | 29,745 |
Simply Sudoku
Description:
Sudoku puzzles come in all different shapes and difficulty
levels. Traditionally a Sudoku puzzle is a $9\times 9$ grid. Initially, some of
the cells are filled in with numbers and some are empty. The
goal is to fill in each cell with a number in the range
$1$ – $9$ subject to... | 29,746 |
Single Cut of Failure
Description:
The Intrusion and Crime Prevention Company (ICPC) builds
intrusion detection systems for homes and businesses. The
International Collegiate Programming Contest (in a strange
coincidence also known as ICPC) is considering hiring the
company to secure the room that cont... | 29,747 |
Single source shortest path, negative weights
Description:
## Input
The input consists of several test cases. Each test case
starts with a line with four non-negative integers,
$1 \le n \le 1000$,
$0 \le m \le 5000$,
$1 \le q \le 100$ and
$0 \le s < n$,
separated by single spaces, where $n$ is... | 29,748 |
Single source shortest path, non-negative weights
Description:
## Input
The input consists of several test cases. Each test case
starts with a line with four non-negative integers,
$1 \le n \le 10\, 000$,
$0 \le m \le 30\, 000$,
$1 \le q \le 100$ and
$0 \le s < n$,
separated by single spaces, ... | 29,749 |
Single source shortest path, safe path
Description:
Kattis needs to get somewhere as soon as possible. However,
she also wants that the path that she takes to be safe too. She
deems that paths that use not more than $\textbf{k}$ junctions to be safe
paths. Given a map containing $\textbf{V}$ junctions with... | 29,750 |
Single source shortest path, time table
Description:
## Input
The input consists of several test cases. Each test case
starts with a line with four non-negative integers,
$1 \le n \le 10\, 000$,
$0 \le m \le 20\, 000$,
$1 \le q \le 100$ and
$0 \le s < n$,
separated by single spaces, where $n$ ... | 29,751 |
Sith
Description:
What follows is an Icelandic translation of the script for
Revenge of the Sith using Google Translate.
Obi-wan remarks that only a Sith deals in absolutes, but an
absolute value can be defined as an operation that makes a
value non-negative. An absolute value can be written as
$|x|$ ... | 29,752 |
Six Degrees
Description:
For years and years, the ICT Senior Service Desk (ISSD) of
the university has been confronted with a slow wired network
that gives unexpected time-outs and seemingly random slow
connection speeds. A new manager has been hired to solve these
problems once and for all. The manage... | 29,753 |
Sjecista
Description:
Consider a convex polygon with $N$ vertices, with the additional
property that no three diagonals intersect in a single point.
Find the number of intersections between pairs of diagonals in
such a polygon.
The figure below shows one such polygon with 6 vertices.
Note that a polygon ... | 29,754 |
Skakavac
Description:
A grasshopper is in a flower field. The field contains
$N \cdot N$ flowers
arranged in $N$ rows and
$N$ columns. For each
flower in the field, we know how many petals it has.
The grasshopper is initially on the flower in row
$R$ and column
$C$. Its goal is to visit
as... | 29,755 |
Skammstöfun
Description:
Before Hannes founded the startup company which focused on
naming startup companies, a more primitive method of naming was
used for companies, services and products. The entity which was
to be named was simply described with words and an abbreviation
was formed from the words.
... | 29,756 |
Skattareiknivel
Description:
Sigurjón was chosen employee of the month at Krabbaborgarar
for twelve months in a row, and therefore got a big raise.
However, Sigurjón knows that he will not directly receive all
of his salary, first he must pay into a pension fund and a
supplementary pension fund, and th... | 29,757 |
Skattaskrattar
Description:
When people earn wages they have to pay taxes on them to the
government. To calculate how much they should pay, the wages
are divided into tax brackets that the government announces,
but in each bracket a certain percentage of the wages that fall
into that bracket have to be... | 29,758 |
Skattmann
Description:
You just got paid, all numbers from $1$ to $n$ are now in your possession after a
hard month. But unfortunately things aren’t quite so simple,
because now you have to pay tax. You sit down across from the
Skattmann, and the game begins. You may take one of the numbers
from $1$ to... | 29,759 |
Skener
Description:
Having solved the match issue, Mirko faced another
challenging problem. His mom ordered him to read an article
about the newest couples on the Croatian show-biz scene in the
“Moja Tajna” magazine. The article is written in a very small
font size which Mirko cannot read. Luckily, Mir... | 29,760 |
Ski
Description:
It’s the holidays! There is a famous ski slope you would
like to try this year.
The slope, which runs $N$ meters long from west to east, has
its height measured at 1-meter intervals from its beginning at
the west, producing $N +
1$ height measurements $H(i)$, where $0 \le i \le N$. It... | 29,761 |
Ski Jumping
Description:
Ski jumping is one of the most popular winter sport
competitions. In the chase of records, ski jumping hills become
larger and larger. To ensure the safety of the competitors,
landing speed and angle must not exceed critical margins
defined by the FIS. Today, it’s your task to ... | 29,762 |
Ski Lifts
Description:
The only thing remaining from the old lift system are
$n$ pylons situated at
integer coordinates in the plane. You would like to put lifts
in the form of line segments between some of these pylons. The
line segments must satisfy the following constraints:
* A line segment can on... | 29,763 |
Ski Resort
Description:
As an enterprising owner of a world-renowned ski resort in
the US, you would like to increase your sales by stocking snack
stands at key locations throughout your estate.
The ski resort is built on a mountain. A ski lift can take a
guest to the top of the mountain. From there they ... | 29,764 |
Skiing
Description:
As you know, the ACM ICPC is not the only major sporting
event taking place in Russia this year. Several months ago, the
2014 Winter Olympics were held in Sochi, which is about 3 000
km from Ekaterinburg.
In an increasing number of sports, it is not only the
ability of the athletes... | 29,765 |
Skilaboð
Description:
## Input
The input begins with a line with a single integer
$N$. Next there are
$N$ lines with two
integers each, $x_i$ and
$y_i$, where the values in
line $i$ denotes the
location of person $i$,
$|x_i|, |y_i| \leq 10^9$.
Then there is a line with a single integer... | 29,766 |
Skocimis
Description:
Three kangaroos are playing in the desert. They are playing
on a number line, each occupying a different integer. In a
single move, one of the outer kangaroos jumps into the space
between the other two. At no point may two kangaroos occupy the
same position. Help them play as long... | 29,767 |
Skotleikur
Description:
Recently, Elvar has been playing the new shooter that
everyone is playing; Medal of Valor: Contemporary Tactics
2.
Elvar has finally played long enough to unlock access to his
favourite gun, but whenever he uses it, he notices that it is
not particularly good, and other players... | 29,768 |
Skrift
Description:
Bjarki is going to write an $n$-letter word. Bjarki hasn’t decided
what word it will be, but he knows that it will consist of
$m$ different letters
where the $i$-th letter
apppears $a_i$ times in
the word and it takes $b_i$ milligrams of eraser to erase an
instance of this l... | 29,769 |
Sky Islands
Description:
Alex wants to build a sky base consisting of $N$ sky islands, numbered $1, \ldots , N$. There are a total of
$M$ bridges, directly
connecting certain islands to others. Because she does not have
an elytra (wings that enable players to fly) and cannot fly,
she needs to make sure... | 29,770 |
Sky's the Limit
Description:
Unfortunately, all is not well in Eagleton: the citizens
have a bit of an envy problem. Every day, one random citizen
(the owner of house $i$,
let’s say) emerges from their house and compares their house’s
height to the heights of the two neighboring houses. If house
$i... | 29,771 |
Skyline
Description:
In this problem, we assume that all buildings have a
trapezoid shape when viewed from a distance. That is, vertical
walls but a roof that may slope. Given the coordinates of the
buildings, calculate how large part of each building that is
visible to you (i.e. not covered by other b... | 29,772 |
Skák
Description:
Petra and Garðar are playing chess on an infinitely large
chessboard. In this strange version of chess they each start
with a million pieces in the game. The game isn’t over until
one player removes all of their opponent’s pieces.
As you might imagine this version of chess takes quite a
... | 29,773 |
Slalom
Description:
In spite of the scarcity of snowfall in Madrid, interest in
winter sports is growing in the city, especially with regard to
skiing. Many people spend several weekends or even full weeks
improving their skills in the mountains.
In this problem we deal with only one of the multiple alpin... | 29,774 |
Slalom 2
Description:
You may select from $S$
pairs of skis, where the $j$-th pair has speed $s_{j}$. Your movement is governed by
the following rule: if you select a pair of skis with speed
$s_{j}$, you move with a
constant downward velocity of $s_{j}$ metres per second.
Additionally, at any time ... | 29,775 |
Slant Drilling
Description:
AcmeCorp is always looking to expand its drilling
operations.
Their latest target is a largely uninhabited area in the
North of the country, known as Crossland. Since the pocket of
oil is quite deep already, and new drill bits are expensive,
Crossland’s oil company would li... | 29,776 |
Slatkisi
Description:
Mirko buys a lot of candy in the candy shop. He cannot
always pay the exact amount so the shopkeeper and he have an
agreement. He tells the shopkeeper the smallest bill he has,
and she rounds his amount to the nearest number he can pay. For
example, if the smallest bill Mirko has ... | 29,777 |
Sleeping on the Train
Description:
Antonio is sightseeing in Line Town. Part of his sightseeing
involves taking the famous Line Train. The Line Train goes
through $n$ stops
conveniently numbered from $1$ to $n$. The path the Line Train takes
involves starting at stop $1$, then going to every stop in
... | 29,778 |
Slicice
Description:
After their pool burst, Mirko and Slavko started collecting
cards. In their neighbourhood, card collection is taken
seriously and there are strict rules for the purchase and
trading of cards.
Purchasing cards is always done by two children
together. Each of them gives half the req... | 29,779 |
Slide Count
Description:
In your programming class, you are given an assignment to
analyze an integer array using a sliding window algorithm.
Specifically, given $N$
integers $w_1, \ldots , w_
N$ and some constant $C$, the sliding window algorithm
maintains start and end indices $s$ and $e$ such th... | 29,780 |
Sliding Blocks
Description:
Sliding Blocks is an interesting puzzle game which can be
played on most mobile devices. In this game, you are given an
$N \times M$ board with
exactly one cell containing a block; all the other cells are
empty. You can add a block to the board by sliding the new
block f... | 29,781 |
Sliding Tiles
Description:
You have placed 25 lettered tiles in a nice, neat
$5 \times 5$ grid like the
first one below. You start to slide the tiles around one space
at a time, either up, down, left or right. As you move a tile,
it pushes along any tiles ahead of it. For example, if you push
the M... | 29,782 |
Slika
Description:
Mirko has just installed a brand new drawing program. The
program supports $K$
different colours, denoted by integers from 1 to $K$. All drawing is performed on a
canvas with dimensions $N\times
N$. In the beginning, all cells are white (denoted by
1).
The upper left cell of the... | 29,783 |
Slikar
Description:
The evil emperor Cactus has in his possession the Magic Keg
and has flooded the Enchanted Forest! The Painter and the three
little hedgehogs now have to return to the Beaver’s den where
they will be safe from the water as quickly as possible!
The map of the Enchanted Forest consists of... | 29,784 |
Slikar
Description:
Josip is a strange painter. He wants to paint a picture
consisting of $N \times N$
pixels, where $N$ is a
power of two ($1, 2, 4, 8,
16$ etc.). Each pixel will be either black or white.
Josip already has an idea of how each pixel will be
coloured.
This would be no problem i... | 29,785 |
Slim Cut
Description:
Consider a weighted, undirected graph $G(V,E;w)$. A cut is a partition of
the vertices into two non-empty subsets $S$ and $\overline S$. Let us define the
slimness of the cut $\{
S, \overline S\} $ to be
In other words, the sliminess of the cut is the maximum
weight among all edg... | 29,786 |
Slippery Floor
Description:
Despite his lack of skating ability, Tom always seems to
find himself on an outdoor rink with his friends. Due to his
poor skills Tom is unable to steer himself on skates and is
only able to push himself in one of the cardinal directions
(North, South, East, and West) when h... | 29,787 |
Slom
Description:
Little Marin spent all his day generating test data for
COCI. He simply couldn’t make it work, so he had a nervous
breakdown and can’t even see clearly anymore. Every time he
blinks while reading, the letters in a word get mixed up so
that the letters from the second half of the word ... | 29,788 |
Slon
Description:
A student called Slon is very mischievous in school. He is
always bored in class and he is always making a mess. The
teacher wanted to calm him down and “tame” him, so he has given
him a difficult mathematical problem.
The teacher gives Slon an arithmetic expression $A$, the integer $P$ ... | 29,789 |
Slow Leak
Description:
You are an avid cyclist and bike every day between your home
and school. Usually, your ride is uneventful and you bike along
the shortest path between home and school. After school this
afternoon you realized you have a slow leak in your bike
tire—the tire can hold some air, but ... | 29,790 |
Sly Students
Description:
Students in a boring class want to be able to write notes to
each other while removing the threat of the teacher knowing
what they are saying if the teacher happens to get hold of a
note. Therefore, the students have created a simple way to
encode their messages. The encoding ... | 29,791 |
Small Schedule
Description:
Everybody is into cloud computing these days, so quite a few
different business models are being experimented with. You are
trying a very simple one: you sell time on your machines in one
of two batches called slots. A customer can buy one
second of CPU time or $Q$
secon... | 29,792 |
Smallest Calculated Value
Description:
Given three integers and the arithmetic operators
($+$, $-$, $*$, $/$), determine the smallest
non-negative integer possible without changing the order of the
initial integers. Order of the operators is without their
normal precedence, just left-to-right. Note: in... | 29,793 |
Smallest Multiple
Description:
Given a set of numbers, find the smallest number that is a
multiple of every number in the set.
## Input
Input consists of up to 500 test cases, one per line. Each
test case contains at least one but no more than 1000
space-separated integers, each in the range $[1, 2^{31}-... | 29,794 |
Smart Password Validation
Description:
People often make errors when entering passwords for one of
their many accounts. This is becoming more of a problem with
the rather lengthy passwords that many online portals require
(the more characters in the password, the more chance there is
of making a typing... | 29,795 |
Smart Phone
Description:
You have a very smart phone. Here is the user experience
when entering a word:
* You decide on the word you want to write.
* You start typing it.
* At some point, three suggestions appear. The list of
suggestions never changes after it has first been
presented, even if y... | 29,796 |
Smooth Array
Description:
Any array can be made $K_
S$-smooth by changing its elements. In each change one
element may be modified to any integer between $0$ and $S$, inclusive. You want to make all
of your arrays smooth, but you don’t want to make any more
changes than necessary. So the question is: W... | 29,797 |
Smooth Monkey
Description:
Unfortunately, having three heads consumes a lot of energy,
so the monkey drinks one millilitre (ml) of smoothie per meter
she walks. Note that this is completely continuous, so for
example after walking $\frac{\sqrt {2} + \pi }{3}$ meters
she has consumed $\frac{\sqrt {2}
... | 29,798 |
Smoothed Gardens
Description:
The Flathead Fancy Landscaping Company’s customers
are too high-class to have gardens with straight edges so Joe
P. Flathead, the owner, has come up with a way to smooth out
the contours. He puts a stake in each corner of a triangular
plot and drops a loop of rope around t... | 29,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.