task stringlengths 0 154k | __index_level_0__ int64 0 39.2k |
|---|---|
Stafur
Description:
## Input
The input is a single line containing a single upper case
letter of the English alphabet.
## Output
Print Jebb if the letter is a
vowel, Neibb if the letter is a
consonant and Kannski if it’s
unknown.
## Scoring
Group
Points
Constraints
1
100
No further constraint... | 29,900 |
Staggering to the Finish
Description:
An oval track and field racing track consists of two
parallel straightaway sections connected by two semicircles,
depicted in Figure 1. Footraces run in the
counterclockwise direction, ending at a common finish line
located along the lower straightaway. For races t... | 29,901 |
Stained Carpet
Description:
The Algebraist Carpet Manufacturing (ACM) group likes to
produce area carpets based upon various geometric figures. The
2014 ACM carpets are all equilateral triangles. Unfortunately,
due to a manufacturing defect, some of the carpets are not as
stain-resistant as intended. T... | 29,902 |
Stalínröðun
Description:
One of the many times Unnar was scrolling and looking
through new posts on the social media site ReadIt he saw a post
on /l/codingjests about Stalinsort. In it a linear sorting
algorithm was described, it worked by eliminating all elements
that aren’t in increasing order.
Then... | 29,903 |
Stammering Aliens
Description:
Dr. Ellie Arroway has established contact with an
extraterrestrial civilization. However, all efforts to decode
their messages have failed so far because, as luck would have
it, they have stumbled upon a race of stuttering aliens! Her
team has found out that, in every lon... | 29,904 |
Stamp Combinations
Description:
You’re on your way to pick up a package from the store, wrap
it, and mail it. You want to bring a certain number of stamps
to mail it, and you have a long roll of stamps that you can
use. Now, over time, you’ve occasionally pulled off a stamp
from somewhere in the middle... | 29,905 |
Stamp Stamp
Description:
Bureaucrats love bureaucracy. This assertion seems fairly
obvious but a less obvious observation is the amount of
paperwork this means!
When paperwork is complete, a bureaucrat stamps the official
document with their official stamp of office. Some bureaucrats
are extra thoroug... | 29,906 |
Stand on Zanzibar
Description:
Turtles live long (and prosper). Turtles on the island
Zanzibar are even immortal. Furthermore, they are asexual, and
every year they give birth to at most one child. Apart from
that, they do nothing. They never leave their tropical
paradise.
Zanzi Bar, the first turtle ... | 29,907 |
Stanovi
Description:
Stanko is working as an architect in a construction company.
His current task is to make a ground plan for a residential
building located in Zagreb. He must determine a way to split
the floor building with walls to make apartments in the shape
of a rectangle. Each built wall must b... | 29,908 |
Star Arrangements
Description:
```
* * * * * *
* * * * *
* * * * * *
* * * * *
* * * * * *
* * * * *
* * * * * *
* * * * *
* * * * * *
```
This pattern has the property that adjacent rows differ by
no more than one star. We represent this star arrangement
compactly by the n... | 29,909 |
Star Battles I
Description:
A Star Battle (of the $2$-star variety), also known as “Two
Not Touch” as published by The New York
Times, is a solitary star-placement puzzle played on a
$10\times 10$ grid. The
grid is divided into exactly ten $4$-connected regions, and the
objective is to place exactl... | 29,910 |
Star Battles II
Description:
A Star Battle (of the $2$-star variety), also known as “Two
Not Touch” as published by The New York
Times, is a solitary star-placement puzzle played on a
$10\times 10$ grid. The
grid is divided into exactly ten $4$-connected regions, and the
objective is to place exact... | 29,911 |
Star Wars
Description:
Near the planet Mars, in a faraway galaxy eerily similar to
our own, there is a fight to the death between the imperial
forces and the rebels. The rebel army has $N$ ships which we will consider as
points $(x_{i}, y_{i},
z_{i})$. Each ship has a receiver with power
$p_{i}$. T... | 29,912 |
Star Wars Movies
Description:
We actually have two orderings of Star Wars movies: creation
order and plot order. You’d like to be able to translate
between these orderings. Both orderings start at $1$. If a movie is created and
inserted at plot index $i$
the plot index of every movie with a plot index ... | 29,913 |
Star Wars röðun
Description:
## Input
The first line contains a single integer $n$, the number of numbers where
$n$ is a multiple of
$3$. The second line
contains $n$ different
integers separated by spaces, where each value $x$ satisfies $1 \leq x \leq 10^9$.
## Output
The starwars-order of the valu... | 29,914 |
Staring Contest
Description:
A staring contest is a classical battle of imperturbability
in which two people stare into each other’s eyes while
maintaining a facial expression of assured serenity. The goal
is to maintain eye contact for longer than your opponent. The
contest ends when one participant b... | 29,915 |
Stars in a Can
Description:
Vera is an astronomer studying locality of nearby star
systems. The star systems can be thought of as 3D points in
space. Vera would like to place a can around the stars. In
other words, she would like to know what is the smallest volume
cylinder that encloses the stars. The... | 29,916 |
State Transfer Matrix
Description:
Make a program that you can use for state transfer matrix
problems in the rest of this module/problem set.
A state transfer matrix $A$ gives the number of ways to move
from one state to another. For example if we have $5$ states then there are $a_{3,2}$ number of ways to mov... | 29,917 |
Statisticians
Description:
Statisticians like to create a lot of statistics. One simple
measure is the mean value: the sum of all values divided by the
number of values. Another is the median: the middle among all
values when they have been sorted. If there are an even number
of values, the mean of the... | 29,918 |
Statistics
Description:
Research often involves dealing with large quantities of
data, and those data are often too massive to examine manually.
Statistical descriptions of data can help humans understand
their basic properties. Consider a sample of $n$ numbers $X=(x_1,x_2,\ldots ,x_ n)$. Of many
stati... | 29,919 |
Statues
Description:
Central City is best known for its famous Statue Park. The
park is laid out as a grid, with each grid square housing
either a statue or some park water feature (see Figure 1a). The
statues come in all shapes and sizes and therein lies the
problem, as some of the statues are so larg... | 29,920 |
Staza
Description:
A bicycle race is being organized in a country. The
transport network of the country consists of $N$ cities numbered $1$ through $N$, with $M$ bidirectional roads connecting
them. We will use the following terms:
* A path is a sequence of roads in which each
road starts in the city ... | 29,921 |
Steppe on It
Description:
Providing emergency services is always challenging,
especially for sparsely populated areas such as the Kazakh
Steppe. The cost of building infrastructure is high compared to
the number of people served. It is therefore important to
minimize both the number of roads and the nu... | 29,922 |
Stickers
Description:
Filoména wants to write a message on her newly opened
sticker store. She wants to write the message using stickers
that she sells in the store. Each sticker spells a word and has
a price. She has unlimited supply of any type of sticker. The
stickers can overlap but the maximum thi... | 29,923 |
Sticky Keys
Description:
Bob is texting Alice about his favourite programming
problems, but he spilled coffee on his keyboard and now the
keys get stuck when he types. The other day, he tried to tell
her about the upcoming contest “UAPC”, but accidentally sent
“UAAAAAPC” since his A key got stuck! Bob ... | 29,924 |
Sticky Situation
Description:
While on summer camp, you are playing a game of
hide-and-seek in the forest. You need to designate a “safe
zone”, where, if the players manage to sneak there without
being detected, they beat the seeker. It is therefore of utmost
importance that this zone is well-chosen.
... | 29,925 |
Stigavörður
Description:
You really like playing games with your friend. This time,
however, you are stuck being the score keeper for two of your
friends. They are playing a game where $n$ numbered tiles lay on the board in
a line. The players can do one of two moves each turn:
* Select a single tile and ... | 29,926 |
Stikl
Description:
## Input
The first line of the input consists of two integers
$n$, the number of tiles,
where $1 \leq n \leq
10^5$, and $q$, the
number of queries, where $1 \leq
q \leq 10^5$. The second line of the input consists of
$n$ space separated
integers, corresponding to the num... | 29,927 |
Stirling's Approximation
Description:
The value of $n! = 1\cdot 2
\cdot 3 \cdot \ldots \cdot (n-1) \cdot n$ can be quite
large, and it can be tedious to calculate. Fortunately for us,
the French mathematician Abraham de Moivre (1667-1754) and the
Scottish mathematician James Stirling (1692-1770) came u... | 29,928 |
Stock Prices
Description:
In this problem we deal with the calculation of stock
prices. You need to know the following things about stock
prices:
* The ask price is the lowest price at which
someone is willing to sell a share of a stock.
* The bid price is the highest price at which
someone i... | 29,929 |
Stogovi
Description:
Mirko is playing with stacks. In the beginning of the game,
he has an empty stack denoted with number $0$. In the $i$-th step of the game he will choose
an existing stack denoted with $v$, copy it and do one of the
following actions:
* place number $i$ on
top of the new stack
... | 29,930 |
Stoichiometry
Description:
You have landed a lucrative contract with Amalgamated
Chemical Manufacturing (ACM), to help their chemists with
stoichiometry. Stoichiometry is the calculation of reactants
and products in chemical reactions, based on the law of
conservation of mass, which states that the tot... | 29,931 |
Stol
Description:
Mirko has bought an apartment and wants to invite to dinner
as many people as possible to celebrate with him. For this he
needs a large rectangular wooden table for which he will sit
down with his guests. The number of people a table can
accommodate is equal to its perimeter (the sum ... | 29,932 |
Stop Counting!
Description:
The Martingale casino is creating new games to lure in new
gamblers who tire of the standard fare. Their latest invention
is a fast-paced game of chance called Stop Counting!,
where a single customer plays with a dealer who has a deck of
cards. Each card has some integer val... | 29,933 |
StopCard
Description:
Jacob is playing a very odd solo card game called StopCard.
In this game, the deck consists of $n$ cards where every card has one
unique integer written on one side of it. The deck is shuffled
randomly before the game is played. During each turn of the
game, Jacob can choose to ei... | 29,934 |
Stopwatch
Description:
Robin just received a stopwatch from her grandfather.
Robin’s stopwatch has a single button. Pressing the button
alternates between stopping and starting the stopwatch’s timer.
When the timer is on, the displayed time increases by 1 every
second.
Initially the stopwatch is stopp... | 29,935 |
Straight Road Communications
Description:
Rumour has it that the roads in the Australian outback run
straight for enormous distances. On one such road, we have
placed $N$ pairs of twins,
such that nobody is separated by more than $B$ kilometers from their twin. Each
person is supplied with a radio that... | 29,936 |
Straights
Description:
In poker, a straight is a continuous
sequence of cards, in this case of any length. Your friend John
makes up a game called straights which is played with
$N$ cards with numbers
that may repeat, between $1$ and $10^4$. In order to win, you must get
rid of all of your cards in... | 29,937 |
Straza
Description:
Near a military base there is a system of trenches, modeled
as line segments on a plane. During nighttime, when most
soldiers are fast asleep, three guards stand watch of the
trenches. Two guards can see each other if there is a trench
(or a row of trenches) along the entire straigh... | 29,938 |
Stream Lag
Description:
Live stream audiences often encounter undesired stream lag.
The lag may occur for multiple reasons, such as slow network
speed, high stream resolution, not enough processing power on
the client hardware, etc. In this problem, we will model and
compute the stream lag for one hypo... | 29,939 |
Streaming Services
Description:
Last year, you finally went ahead and became a
cord-cutter, cancelling your TV subscription to avoid
all the annoying ads. This was a relief. Suddenly, you could
watch TV whenever you wanted, rather than when the TV
channels dictated it. Of course, this new-found happine... | 29,940 |
Streaming Statistics
Description:
When delivering streaming music one keeps track of which
track was requested, when streaming completed (Unix epoch in
milliseconds (ms)), its duration in milliseconds (ms), and its
bitrate in kilobits per second (kbps). If a track has duration
100 000 ms and ended at 1... | 29,941 |
Streets Ahead
Description:
International Connecting Passage Causeway is a long, rutted
two-way country road crossed by streets at different
points.
There are many drivers, and each will drive along the
country road starting at some intersection and ending at some
other intersection. For each driver, h... | 29,942 |
Streets Behind
Description:
Your running club has some serious runners and some casual
runners. You schedule several training runs with a mixture of
serious runners and casual runners. Serious runners run at a
faster pace than casual runners, and will leave them
behind.
You want all the runners to bec... | 29,943 |
Stretching Streamers
Description:
Ms. Hall wants to teach her class about common factors. She
arranges her students in a circle and assigns each student an
integer in the range $[2,10^9]$. She also provides the
students with crepe paper streamers. The students are to
stretch these streamers between pai... | 29,944 |
Striker-Count
Description:
One fateful spring evening Bergur was playing his favorite
video game Striker-Count. Bergur is so good at
Striker-Count he usually defeats his opponents without
breaking a sweat. Therefore he’s been racking his brain for new
ways to win with style. He decides to jump in the a... | 29,945 |
String Factoring
Description:
Spotting patterns in seemingly random strings is a problem
with many applications. E.g., in our efforts to understand the
genome we investigate the structure of DNA strings. In data
compression we are interested in finding repetitions, so the
data can be represented more e... | 29,946 |
String Game
Description:
Alice and Bob are playing the following game with strings of
letters.
Before the game begins, an initial string and a target
string are decided. The initial string is at least as long as
the target string. Then, Alice and Bob take turns, starting
with the initial string. Bob g... | 29,947 |
String Hashing
Description:
Given is a string $S = s_0 s_1
... s_{N-1}$. Your task is to compute hashes of
substrings of this string.
You will be given a list of queries of the form $L, R$. For each query, you should
output a hash $H(L, R)$
such that for two hashes are equal if their corresponding
... | 29,948 |
String Matching
Description:
## Input
The input consists of several test cases. Each test case
consists of two lines, first a non-empty pattern, then a non-empty text. Input is terminated by end-of-file. The
input file will not be larger than 5 Mb.
## Output
For each test case, output one line containing th... | 29,949 |
String Multimatching
Description:
## Input
The input consists of at most ten test cases. Each test case
begins with an integer $n$
on a line of its own, indicating the number of patterns. Then
follow $n$ lines, each
containing a non-empty pattern. The
total length of all patterns in a test case is... | 29,950 |
String Stretching
Description:
Start with a string $p$. Now, create a new string
$s$, like this: Start with
the empty string, and insert $p$. Then, choose some position in the
string (including, possibly, the very beginning or the very
end), and insert $p$
again. And again. And again.
For example,... | 29,951 |
String Theory
Description:
Nested quotations are great not only for writing literature
with a complex narrative structure, but also in programming
languages. While it may seem necessary to use different
quotation marks at different nesting levels for clarity, there
is an alternative. We can display var... | 29,952 |
Structural Differences
Description:
The Association for Confounded Metadata is hiring, and you
are applying. The job application is a programming task, which
is described below. If you do well, you’ll be hired.
The Association is a clearinghouse for identifying and
rectifying differences between documents... | 29,953 |
Structural Equivalence
Description:
In programming language design circles, there has been much
debate about the merits of “structural equivalence” vs. “name
equivalence” for type matching. Pascal purports to have “name
equivalence”, but it doesn’t; C purports to have structural
equivalence, but it doe... | 29,954 |
Structural Integrity
Description:
The Makers’ Association of Pristine Sculptures (MAPS) has
come up with designs for some new sculptures. However, none of
the designs meet the necessary safety standards.
Each initial sculpture design can be modelled as a simple
polygon. To make a design safe, it must be a... | 29,955 |
Stuck In A Time Loop
Description:
Last night when you went to sleep, you had a strange feeling
that you may see the same day again. And your strange feeling
came to bewhen you woke up, everyone seemed to think that it
was yesterday morning! The same strange feeling came back in
the evening.
When this ... | 29,956 |
Student Counsel
Description:
Starlight Glimmer: “I am so sorry about today. I’m just so—”
Trixie: “Busy. I know. Obviously
your students are more important than your friends.”
Starlight Glimmer: “That’s not—”
[knocking on door]
[door opens]
Silverstream: “Starlight~! Do you
have a minute?”
Starlight Glim... | 29,957 |
Studentsko
Description:
The annual student team competition in table tennis of
students enrolled in University of Zagreb takes place next
Saturday! Each team consists of $K$ students. The excited students,
$N$ of them, are waiting
in queue to register.
Krešo works at the registration desk. He doesn’t ... | 29,958 |
Studying For Exams
Description:
As a seasoned programming contest competitor, you recognize
immediately that you can determine the optimal allocation with
a computer program. Of course, you have decided to ignore the
amount of time you spend solving this problem
(i.e. procrastinating).
You have a tota... | 29,959 |
Stysti skógarleiðangurinn
Description:
Arnar and Sammi are avid League of Legends players and they
have been playing the game for some time now. Though many do
not believe it, League of Legends is a team game and thus it is
very important to help your teammates. Since Sammi plays the
role of a jungler,... | 29,960 |
Stórafmæli
Description:
Jónas’s birthday is tomorrow and he is trying to decide
whether to have a party. One of Jónas’s new year resolutions
was to only have parties if it’s a big anniversary, those being
every ten years.
Given the age Jónas is turning tomorrow, reply whether it is
a big anniversary o... | 29,961 |
Subaruba
Description:
Ubas hubas bubeuben mubentubiubonubed uba fubew tubimubes
ubin thube pubast, Subaruba ubis rubathuber ubodd. Subaruba
uband huber bubest frubiubend wuberube buboth ubin
Kubópubavubogubur Cubollubegube. Thubeuby cubonvubersubed
frubequbuubentluby, whubethuber thube sububjubect wuba... | 29,962 |
Subcommittees
Description:
In a parliament of $P$
members, the speaker wants to divide the parliament into (at
least two) disjoint subcommittees of equal size. Of course, the
chair of such a subcommittee furthermore wants to divide their
subcommittee into (at least two) sub-subcommittees of equal
s... | 29,963 |
Submarines
Description:
The Russian navy has, as you probably know, had some
problems with their submarines in Swedish waters. These
problems are very embarrassing for the Russian military, who
has decided to do something about it.
As a first step in their plan, they want to construct a
program for th... | 29,964 |
Subprime
Description:
There is an open math problem: Is every non-negative integer
a substring of at least one prime number when expressed in base
ten?
A positive integer is a prime number if it is greater than
one and not a product of two smaller positive integers. Integer
$a$ is a substring of
i... | 29,965 |
Subsequences in Substrings
Description:
You are given two strings $s$, and $t$. Count the number of substrings of
$s$ that contain
$t$ as a subsequence at
least once.
Note that a $substring$
and a $subsequence$ both
consist of characters from the original string, in order. In a
$substring$, th... | 29,966 |
Substitution Mania!
Description:
Your friend Ben absolutely loves substitution ciphers!
A substitution cipher takes the alphabet and lines up a
substitution with it, as shown in the example below:
Then, for each letter of the plaintext, we find that letter
in the top row and substitute it with the correspond... | 29,967 |
Substring Characters
Description:
The set of distinct characters in a string is referred to as
the generalized period of the string. As an example, the
generalized period of the string “aabbabb”
is {‘a’,‘b’}
A proper substring is a contiguous substring that is
contained in a string and is not the stri... | 29,968 |
Substring Switcheroo
Description:
You and your young daughter have been playing a game to help
teach her how to read. She of course loves learning her
letters, rearranging them, and asking with each rearrangement,
‘what does this spell?’ Much of the time the letters are
nonsense, but sometimes they for... | 29,969 |
Substring Tree
Description:
Given a nonempty string, $S,$ consider the construction of a
rooted tree in which each node contains a nonempty substring
$\textrm{of}~ S.$ The
levels of the tree are numbered $0, 1, 2, \ldots ,$ starting with the
top (root) level.
* The root node contains $S.$
* For any n... | 29,970 |
Subtraction Plus Plus
Description:
Alex and Steve just got back home from a mining trip and now
have a lot of extra cobblestone. With their house already
built, they decide to play a game of subtraction. They take
turns subtracting from an initial stack of $N$ cobblestone. At a turn
$i$, the player can... | 29,971 |
Subtraction Plus Plus Plus
Description:
Alex and Steve just got back home from a mining trip and now
have a lot of extra cobblestone. With their house already
built, they decide to play a game of subtraction. They take
turns subtracting from an initial stack of $N$ cobblestone. At a turn
$i$, the playe... | 29,972 |
Subway
Description:
You have just moved from a quiet Waterloo neighbourhood to a
big, noisy city. Instead of getting to ride your bike to school
every day, you now get to walk and take the subway. Because you
don’t want to be late for class, you want to know how long it
will take you to get to school.
... | 29,973 |
Subway
Description:
Johny is going to visit his friend Michelle. His dad allowed
him to go there on his own by subway. Johny loves traveling by
subway and would gladly use this opportunity to spend half a
day underground, but his dad obliged him to make as few line
changes as possible. There are a lot ... | 29,974 |
Subway
Description:
The Stockholm subway is very inefficient. The city does not
look like it did when the current subway lines were built,
meaning certain parts are highly overutilized while some lines
are barely used.
Therefore, the city council has decided to rebuild the
subway. Currently, the syste... | 29,975 |
Subway Map
Description:
In the year 2120 there is a vast subway network under all of
Lund, consisting of $N$
stations and $M$ tunnels.
Each tunnel connects two stations and the stations are numbered
$1$, $\ldots $, $N$.
Erik has had enough of Skånetrafiken’s terrible route
planning software and pl... | 29,976 |
Subway Planning
Description:
The government in a foreign country is looking into the
possibility of establishing a subway system in its capital.
Because of practical reasons, they would like each subway line
to start at the central station and then go in a straight line
in some angle as far as necessar... | 29,977 |
Subway Tree System
Description:
Some major cities have subway systems in the form of a tree,
i.e. between any pair of stations, there is one and only one
way of going by subway. Moreover, most of these cities have a
unique central station. Imagine you are a tourist in one of
these cities and you want t... | 29,978 |
Successful Zoom
Description:
Your boss likes to see numbers going up as proof that your
company is successful. To help with this, you came up with the
idea to summarize a list of numbers by “zooming out,” that is,
to discard everything except every $k^{th}$ number in the list, for some
$k\ge 1$.
Busin... | 29,979 |
Succession
Description:
The king in Utopia has died without an heir. Now several
nobles in the country claim the throne. The country law states
that if the ruler has no heir, the person who is most related
to the founder of the country should rule.
To determine who is most related we measure the amount of... | 29,980 |
Sudoku
Description:
The sudoku board consists of $9\times 9$ cells. These can be
grouped into $3 \times 3$
regions of $3 \times
3$ cells each. Some of the cells are filled with a digit
$1$ through $9$ while the rest of them are left
empty. The aim of the game is to fill each empty cell with a
digit... | 29,981 |
Sudokunique
Description:
The popular game of Sudoku requires the player to fill in a
$9$-by-$9$ board using the digits
$1$ through $9$, such that no row, column, or
$3$-by-$3$ square (see diagram) has more than
one copy of each digit. The player is given a partially
completed board and must fill in... | 29,982 |
Suffidromes
Description:
Given two strings of lowercase letters, $a$ and $b$, print the shortest string
$x$ of lowercase letters
such that exactly one (but not both) of $ax$ or $bx$ is a palindrome; that is, equal
to itself when reversed.
## Input
Standard input contains several pairs of $a$ and $b$ (at ... | 29,983 |
Suffix Array Re-construction
Description:
It has been a long day at your new job. You have spent all
day optimizing the most important Suffix-Array data structures
your new employer, the GCPC ([G]lobal Suffix [C]ollecting and
[P]rocessing [C]ollective), works with. The moment you were
just about to shu... | 29,984 |
Suffix Sorting
Description:
## Input
The input consists of less than $10$ test cases. Each test case begins
with a line containing a non-empty string s, of length at most $100\, 000$. Then follows a line
containing an integer $n$
followed by $n$ integers
$q_1, \ldots , q_ n$,
where $0 \le q_{i} <
... | 29,985 |
Sum Kind of Problem
Description:
For this problem you will compute various running sums of
values for positive integers.
## Input
The first line of input contains a single integer
$P$, ($1 \le P \le 10\, 000$), which is the
number of data sets that follow. Each data set should be
processed identicall... | 29,986 |
Sum Squared Digits Function
Description:
The Sum Squared Digits function, $SSD(b, n)$ of a positive integer
$n$, in base $b$ is defined by representing
$n$ in base $b$ as in:
then:
is the sum of squares of the digits of the
representation.
Write a program to compute the Sum Squared Digits
function o... | 29,987 |
Sum and Product
Description:
Sarah and Patricia are young, very gifted sisters. Ever
since they learned arithmetic in preschool, they have been
bothering their mother Marguerite day and night to practice
their calculations. Marguerite bought the two girls an
arithmetic practice book, which has $n$ page... | 29,988 |
Sum of the Others
Description:
Every day, your job requires you to add up long lists of
integers, like the following:
That is, a sum of positive and negative integers, followed
by an equals sign, followed by a single integer. To save
yourself some time, you normally leave out the $+$ and $=$ signs as you ... | 29,989 |
Sumdoku
Description:
Sumdoku is a variant of the game Sudoku.
As in Sudoku, the aim is to fill in a $9$-by-$9$ grid with the digits $1$ through $9$ so that each digit $1$ through $9$ occurs exactly once in each row,
exactly once in each column and exactly once in each of the
$9$ $3$-by-$3$ sub-squares subj... | 29,990 |
Summer Trip
Description:
Leo has started a job in a travel agency. His first task is
to organize a summer trip to an exotic overseas city. During
the summer season, events of various types take place in the
city: sports matches, concerts, beach parties, and many others.
At any given time, there is exac... | 29,991 |
Sums
Description:
Given an integer $N$,
express it as the sum of at least two consecutive positive
integers. For example:
* $10 = 1 + 2 + 3 +
4$
* $24 = 7 + 8 +
9$
$10 = 1 + 2 + 3 +
4$
$24 = 7 + 8 +
9$
If there are multiple solutions, output the one with the
smallest po... | 29,992 |
Sums of Primes
Description:
You are given a positive integer $n$ and should print the sum of all
primes strictly less than $n$.
## Input
The first and only line of input contains a positive integer
$n \leq 10^{7}$.
## Output
Print the sum of all primes strictly less than $n$.
**Sample Input 1**
**Sample ... | 29,993 |
Sumsets
Description:
Given $S$, a set of
integers, find the largest $d$ such that $a + b + c = d$ where $a, b, c$ and $d$ are distinct elements of
$S$.
## Input
The input starts with an integer $1 \le N \le 4\, 000$, the number of
elements in $S$. It is
followed by $N$ lines
containing the elemen... | 29,994 |
Sun and Moon
Description:
You recently missed an eclipse and are waiting for the next
one! To see any eclipse from your home, the sun and the moon
must be in alignment at specific positions. You know how many
years ago the sun was in the right position, and how many years
it takes for it to get back to... | 29,995 |
Sunlight
Description:
A core right in Roman tenancy law was the availability of
sunlight to everybody, regardless of status. Good sun exposure
has a number of health benefits, many of which were known even
in those ancient times.
The first act of a Roman city plan reviewer, then, is to
survey the prop... | 29,996 |
Sunshine
Description:
The weather in Stockholm has been unusually good during the
last month. There have been a few showers of rain the last few
days, but I’m sure we had a streak of something like 20 days of
constant sunshine in a row.
Now, we’re interested in knowing how likely this is to
happen aga... | 29,997 |
Super Mario 169
Description:
Siggy is quite the video game enthusiast, and he’s been
playing lots of Super Mario 169 lately (the highly obscure
sequel to the more popular Super Mario 64). This game takes
place entirely in an ocean, which can be modelled with a 3
dimensional coordinate system. The playe... | 29,998 |
Supercomputer
Description:
Jóhann, Marteinn and Símon have decided to make the next
generation of supercomputers! They know that it probably won’t
be long before Quantum computers take over, but since they
don’t know anything about Quantum mechanics, they want to rush
these new supercomputers out into ... | 29,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.