task stringlengths 0 154k | __index_level_0__ int64 0 39.2k |
|---|---|
Candy Chain
Description:
A Candy Chain is a sequence of individual candies. Candies
come in $26$ different
flavors identified by the lowercase letters a to
z. Margot has a particularly fancy Candy Chain
displayed in her shop.
After school, children will come to her and buy portions of
the Candy Ch... | 26,700 |
Candy Distribution
Description:
Kids like candy, so much that they start beating each other
if the candy is not fairly distributed. So at your next party,
you better start thinking before you buy the candy.
If there are $K$ kids,
you of course need $K \cdot
X$ candies for a fair distribution, where $X... | 26,701 |
Candy Division
Description:
Benny has just found out that he has $N$ candies in his pocket. He is
always happy to share candies with his friends, because then he
doesn’t have to eat them alone and get fat. There is one
problem, though. He cannot invite any number of friends, since
it would be impossibl... | 26,702 |
Candy Factory
Description:
The International Consortium of Popular Candies (ICPC) is
hosting a prestigious candy festival for candy lovers
worldwide. The consortium has asked $n$ candy factories to produce candies
for the event. Each of the $n$ factories has produced some
quantity of a unique type of c... | 26,703 |
Candy Packaging
Description:
Everyone loves candy. It even enhances your competitive
programming abilities! 1 Thus, you were
very lucky when you inherited a candy factory from your
grandmother. Hopefully, the source of free candy will help
improve your rating on the ProgrammingWeights platform
by a... | 26,704 |
Candy Store
Description:
Candy runs, well, a candy store! It is very popular, she has
a hard time keeping up with all the orders being placed. She
implements a simple system. Each customer who enters the store
will fill their order on a form and sign it with their
initials.
Maybe she should have asked... | 26,705 |
Cangaroo
Description:
Let us talk about the big elephant in the room1: you’ve had a kangaroo in your room
for a while now and you need to hide it without raising
suspicion, since you want to keep the animal. Hiding an animal
of this size is difficult: if you use a lot of space, it is
obvious that you a... | 26,706 |
Canonical Coin Systems
Description:
A coin system $S$ is a finite (nonempty) set of
distinct positive integers corresponding to coin values, also
called denominations, in a real or imagined monetary
system. For example, the coin system in common use in Canada is
$\{ 1,5,10,25,100,200\} $,
where $1$... | 26,707 |
Cantina of Babel
Description:
Characters in Star Wars each speak a language, but they
typically understand a lot more languages that they don’t or
can’t speak. For example, Han Solo might speak in Galactic
Basic and Chewbacca might respond in Shyriiwook; since they
each understand the language spoken b... | 26,708 |
Cantor
Description:
The ternary expansion of a number is that number written in
base $3$. A number can
have more than one ternary expansion. A ternary expansion is
indicated with a subscript $3$. For example, $1 = 1_{3} = 0.222\ldots _{3}$, and
$0.875 = 0.212121\ldots
_{3}$.
The Cantor set is defi... | 26,709 |
Canvas Line
Description:
Your friend Charmion asked you to hang some canvases out to
dry on a straight washing line for an art project she has been
working on. The canvases are artfully arranged such that none
of them overlap, although they may touch along the edges. For
stability, each canvas must be ... | 26,710 |
Canvas Painting
Description:
After last year’s success, Samuel W. E. R. Craft’s fame
continues to grow and now he has funds for all kinds of
projects that cross his mind. His newest idea involves creating
arrays of canvasses with color patterns having no repeated
colors.
Samuel bought a set of white c... | 26,711 |
Canyon Crossing
Description:
The Bridge And Passageway Creators are responsible for
making new paths through the local mountains. They have
approved your plan to build a new route through your favorite
canyon. You feverishly start working on this beautiful new
path, when you realize you failed to take ... | 26,712 |
Canyon Mapping
Description:
Canyons are deep ravines between escarpments or cliffs. They
exist on more than just Earth. For example, Valles Marineris on
Mars is a vast canyon system running along the Martian equator
and is roughly the size of the United States.
Working for a prestigious mapping company, y... | 26,713 |
Capsules
Description:
At some point or another, most computer science students
have written a standard Sudoku solving program. This is yet
another “put numbers in a grid” puzzle.
Numbers are placed in the grid so that each outlined region
contains the numbers $1$
to $n$, where $n$ is the number of squ... | 26,714 |
Captain Obvious and the Rabbit-Man
Description:
“It’s you, Captain Obvious!”—cried the evil
Rabbit-Man—“you came here to foil my evil plans!”
“Yes, it’s me.”—said Captain Obvious.
“But…how did you know that I would be here, on 625 Sunflower
Street?! Did you crack my evil code?”
“I did. Three days a... | 26,715 |
Captured by Aliens
Description:
Astounding news, it was found that aliens exist, and they do
play Go! To check that no planets with intelligent life are in
the way of an intergalactic highway construction project for a
hyperspace express route, they have broadcast a number of game
records to see if the... | 26,716 |
Car Game
Description:
## Task
For each set of three letters find the first word in a
dictionary that contains these letters in the same order.
## Input
The first line of input contains two positive integers
$N \leq 5\, 000$ and
$M \leq 10\, 000$, the
number of words in the dictionary and the number ... | 26,717 |
Car Trouble
Description:
The city center of an unnamed Nordic university town
consists of what was once a medieval city with narrow winding
streets completely surrounded by a high wall protecting the
city against Swedish invaders and other unwanted elements. The
wall has since been removed and replaced... | 26,718 |
Car Vet
Description:
Bob Roberts is the self proclaimed “Car Vet” who owns
several junk car lots where people can come and search for
spare parts for their (ailing) cars. The cars in each lot are
parked in a fenced-in $m \times
n$ grid lot, where each car takes up two grid squares.
Each lot also ha... | 26,719 |
Card Counting Club
Description:
During the creation of the Card Counting Club, the club
wanted to combine their card counting practice along with the
process of choosing player order for their games. They
converged on a counting-out game that is played like so:
* At the beginning of the game, each player ... | 26,720 |
Card Divisibility
Description:
Since you have learned Modular Arithmetic, you know how to
work with quotients and remainders. For every pair of integers
$a$ and $m$ with $m>0$, there exist unique integers
$q$ and $r$ such that $a = m\cdot q+r$ and $0 \leq r < m$. But this is a bit
simple, you wonder if... | 26,721 |
Card Hand Sorting
Description:
Sorting is done by moving one card at a time from its
current position to a new position in the hand, at the start,
end, or in between two adjacent cards. What is the smallest
number of moves required to sort a given hand of cards?
## Input
The first line of input contains ... | 26,722 |
Card Hands
Description:
In his implementation, each hand is stored as a linked list
of cards in a canonical order: the cards are first ordered by
suit: all the clubs come first, followed by all the diamonds,
then all the hearts, and finally the spades. Within each suit,
the cards are ordered by value: ... | 26,723 |
Card Magic
Description:
Johanna knows mind reading magic, or so she says. Her new
trick consists of lining up $N$ decks of cards, each deck having
$K$ cards numbered from
$1$ to $K$. She asks you to think of a number
$T$ between $1$ and $N \cdot K$ and to focus your thoughts
on it. Then, by scannin... | 26,724 |
Card Trading
Description:
Anthony and Cora are playing Dominion, their favorite card
game. In Dominion, there are $T$ different card types, and each
player has a set of cards (known as a deck). A deck
$D$ is said to have
$C$ combos if $C$ is the largest integer such that
for $C$ different card
... | 26,725 |
Card Trick
Description:
The magician shuffles a small pack of cards, holds it face
down and performs the following procedure:
* The top card is moved to the bottom of the pack. The new
top card is dealt face up onto the table. It is the Ace of
Spades.
* Two cards are moved one at a time from the ... | 26,726 |
Cardboard Container
Description:
You work in the planning department for a company that
creates and ships fidget cubes. Having done some market
analysis, you found that your customers want to receive
shipments of exactly $V$ fidget cubes.
This means you have to design a container that will hold
exactl... | 26,727 |
Cardiology
Description:
The Great Cardoni, Master Prestidigitator, has a deck of 21
numbered cards which he uses in a trick as follows:
The process always works, no matter the number selected,
provided that the column containing the secret number is the
second column to be picked up and redealt.
Cardoni ... | 26,728 |
Careful Ascent
Description:
That went well! As police sirens rang out around the palace,
Mal Reynolds had already reached his lifting device outside of
the city.
No spaceship can escape Planet Zarzos without permission
from the High Priest. However, Mal’s spaceship, Firefly, is in
geostationary orbit ... | 26,729 |
Careful Declaration
Description:
“Do not panic!” That is not only the inscription on a famous
book cover, but it is also a message that all banks need to
deliver to their clients during every and each crisis, whatever
negligible. If the clients started to panic, it would mean the
end for any bank.
To ... | 26,730 |
Carl's Vacation
Description:
Carl the ant is back! After traversing meandering paths
(Problem A, 2004 World Finals) and wandering over octahedrons
(Problem C, 2009 World Finals) it is time for a little vacation
— time to see the sights! And where better to see the sights
than at the tips of tall struct... | 26,731 |
Carnival General
Description:
Every four years, the students of Lund come together to
organize the Lund Carnival. For a few days, a park fills with
tents where all kinds of festive activities take place. The
person in charge of making this happen is the carnival
general.
In total, there have been $N$ ... | 26,732 |
Carousel Rides
Description:
## Input
The input will contain multiple test cases, up to
$100$. A test case starts
with a line containing two integers $n$ ($1
\le n \le 10$) and $m$ ($1
\le m \le 20$). Carl will not take advantage of offers
that require him to buy more than $m$ tickets. Following th... | 26,733 |
Carpool
Description:
A group of friends has just completed their CS assignments,
and because of the nice weather, they decide to go to Joe’s
house for a BBQ. Unfortunately, after all that coding, they are
too tired to walk. Fortunately, between them they have enough
cars to take everyone.
Joe remember... | 26,734 |
Cars
Description:
The cars are already good at staying inside the lines and
turning. However, they are not very good at detecting other
moving vehicles. Fortunately, the government of Sweden is so
enthusiastic about self-driving cars that they have banned all
other forms of transportation in Stockholm,... | 26,735 |
Cascade Centrality
Description:
Given an undirected graph $G=(V,E)$, the cascade centrality of
node $i$ in $V$ is defined to be:
where $P_{ij}$ is the
set of all simple paths from node $i$ to node $j$, and the degree sequence product
$\chi _P$ of a path is the
product of the degrees of all nodes along... | 26,736 |
Cash Transport
Description:
CSN just sent you this month’s student loan. Finally, you
have enough money to rent DBus, the computer science student
division’s very own van! You’ve thought about going on a road
trip but as the responsible student you are you’ve decided to
use this possibility to earn mon... | 26,737 |
Casting Spells
Description:
Casting spells is the least understood technique of dealing
with real life. Actually, people find it quite hard to
distinguish between real spells like “abrahellehhelleh” (used
in the battles and taught at the mage universities) and screams
like “rachelhellabracadabra” (used... | 26,738 |
Castle Wall
Description:
The owner of the castle Drakfjälls Kastell is worried about
a potential siege. If this happens, he wants the wall to be
sturdy, so he plans to reinforce it. The castle wall consists
of $N$ wall segments
arranged in a line. Each wall segment has a certain height.
Below is an... | 26,739 |
Cat And Mouse
Description:
Any resemblance to real or fictious cats
and mice in this problem is purely coincidental. Also, no sheep
were harmed in the making of this problem. Promise.
Tom the mouse is standing in the middle of a circle with
radius $R$ meters. Jerry
the cat is waiting for him on the pe... | 26,740 |
Cat Coat Colors
Description:
Black is usually written as B, Red
as O, Dilution as D. In general, a cat has two copies of each
gene, one from each parent (except for the red gene which is
sex-bound, we’ll return to that later). Each copy can be either
dominant, which we’ll denote using an upper case
... | 26,741 |
Cat Fight
Description:
The Djingis Khan neighborhood in Lund is home to many cats,
each of which has a defined territory with a certain radius,
centered around their home at point $(x, y)$. In Djingis Khan it appears
that all cats with the same gender have the same radius of
their territory. Male cats ... | 26,742 |
Cat and Mice
Description:
Everyone knows that cats love to eat mice. Naturally, when
given the opportunity, any cat wants to eat as many mice as
possible.
It just so happens that Cartesian Cat lives on the Cartesian
Plane with her home located at $(0, 0)$. Obviously, none of the mice
live at this loca... | 26,743 |
Cat in a tree
Description:
A cat lives in a tree that has $N$ nodes. She will demarcate her
territory by “marking” some of the tree nodes. Marked nodes may
not be closer to each other than distance $D$, or the smell will be too
overwhelming. Find the maximum number of nodes that the cat can
mark.
## I... | 26,744 |
Cat vs. Dog
Description:
The latest reality show has hit the TV: “Cat vs. Dog”.
In this show, a bunch of cats and dogs compete for the very
prestigious Best Pet Ever title.
In each episode, the cats and dogs get to show themselves off,
after which the viewers vote on which pets should stay and
whic... | 26,745 |
Catalan Numbers
Description:
## Input
The first line of input consists of an integer $q$, where $1 \leq q \leq 1000$. Then follow
$q$ lines, each containing
an integer $x$ where
$1\leq x\leq 5000$.
## Output
Then for each query $x$, output a line containing
$C_ x$, the $x$:th Catalan number.
**Samp... | 26,746 |
Catalan Square
Description:
Last weekend you and your friends went to visit the local
farmer’s market at the town square. As you were standing around
in a circle talking, you couldn’t help overhearing two of your
friends musing over what sounded like an interesting problem:
They were considering the nu... | 26,747 |
Catbus Planning
Description:
You are on the planning committee for upcoming Catbus
routing. There are $k$
Catbuses, and your task is to choose routes for each of them.
There are $n$ cities and
$m$ bidirectional roads
between them. A Catbus route is a path consisting of at least
one road. Furthe... | 26,748 |
Catch the Plane
Description:
Your plane to the ICPC Finals departs in a short time, and
the only way to get to the airport is by bus. Unfortunately,
some of the bus drivers are considering going on strike, so you
do not know whether you can get to the airport on time. Your
goal is to plan your journey ... | 26,749 |
Catching Noodles
Description:
Historians record an age where humans were once able to
cough in public and eat out with friends. Of interest today is
the tradition of Nagashi Sōmen, where
noodles are “place(d) in a long flume of bamboo… As (they) pass
by, diners pluck them out with their chopsticks”. Fo... | 26,750 |
Catenyms
Description:
A catenym is a pair of words separated by a period such that
the last letter of the first word is the same as the first
letter of the second. For example, the following are
catenyms:
```
dog.gopher
gopher.rat
rat.tiger
aloha.aloha
arachnid.dog
```
A compound catenym is a sequence of... | 26,751 |
Catering
Description:
Unfortunately, in some weeks the number of catering teams is
less than the number of requests, so some teams may have to be
used for more than one event. In these cases, the company
cannot wait for the host to return the equipment and must keep
the team on-site to move the equipme... | 26,752 |
Catmas Gifts
Description:
To make things easier, we decided that this year each person
will buy just one gift. We will then put all the gifts in a big
bag and choose an order among ourselves, with all orderings
being equally likely. Then, in this order, each person picks a
gift from the bag, where each... | 26,753 |
Cave Exploration
Description:
Alice is a soccer coach who occasionally bring her soccer
team to explore Caveland (that can be modeled as an undirected
unweighted connected graph) for special event, e.g. for
initiation ceremony, to celebrate birthdays, etc. Caveland has
$N$ junctions and
$M$ tunnels... | 26,754 |
Cave Exploration
Description:
It is monsoon season, and your goldfish Orange is stuck at
the bottom of a cave system in Thailand. Every hour, the water
rises by $1$ meter.
Thankfully, Orange has the ability to swim instantaneously from
one location to another. However, he can’t hop over the sharp
r... | 26,755 |
Caveat Emptor
Description:
“A foole and his monie be soone at
debate: which after with sorrow repents him too late.” –Thomas
Tusser.
The real estate bubble has popped, and the country has been
thrown into a housing market crisis! You, an aspiring
developer, sensed opportunity in the midst of chaos, a... | 26,756 |
Caving
Description:
You recently took on the pastime of caving, primarily
because of the treasures that are hidden behind the darkness.
Whenever you head into a cave, you map out its structure and
assign each cavern an integer value denoting your speculation
of the worth of exploring that cavern. This ... | 26,757 |
Cavli
Description:
Mirko found a wooden board and $N$ nails in his attic. Mirko hammered
the nails into the board as fast as possible. The board can be
modeled by a coordinate plane and the nails as points in it. No
two nails have the same $x$- or the same $y$-coordinate.
In order to keep having fun, Mirk... | 26,758 |
Ceiling Function
Description:
Advanced Ceiling Manufacturers (ACM) is analyzing the
properties of its new series of Incredibly Collapse-Proof
Ceilings (ICPCs). An ICPC consists of $n$ layers of material, each with a
different value of collapse resistance (measured as a positive
integer). The analysis A... | 26,759 |
Celebrity Split
Description:
Jack and Jill have decided to separate and divide their
property equally. Each of their $N$ mansions has a value between
$1\, 000\, 000$ and
$40\, 000\, 000$ dollars.
Jack will receive some of the mansions; Jill will receive some
of the mansions; the remaining mansions ... | 26,760 |
Cellular Merging
Description:
It seems that wireless phone companies are merging all the
time. As they merge, they have to unify their existing
networks, and they may find that they don’t need to keep all
their existing cellular towers. This could happen if the two
merging networks have two towers that... | 26,761 |
Cent Savings
Description:
When I get to the cash register, I put all my $n$ items on the conveyor belt and
wait until all the other customers in the queue in front of me
are served. While waiting, I realize that this supermarket
recently started to round the total price of a purchase to the
nearest mul... | 26,762 |
Central String
Description:
You have a collection of strings of the same length
$L$ and are wondering how
similar they are. We can say that the distance $d(S,T)$ between two strings
$S$ and $T$ of the same length is the number
of indices $i$ where
$S_ i \neq T_ i$. For
example, $d(\texttt{berry... | 26,763 |
Cestarine
Description:
In a single day, $N$ of
Luka’s trucks travel a specific highway. The highway has a
number of exits and entrances. An exit with a particular number
is in the same location as the entrance with that number.
Upon entering the highway, a truck driver receives a ticket
which indicate... | 26,764 |
Cetiri
Description:
Mirko has chosen four integers which form an arithmetic
progression. In other words, when the four numbers are sorted,
then the difference between each pair of adjacent elements is constant.
As has become usual, Mirko lost one
of the numbers and also is not sure whether the remaining t... | 26,765 |
Cetvrta
Description:
Mirko needs to choose four points in the plane so that they
form a rectangle with sides parallel to the axes. He has
already chosen three points and is confident that he hasn’t
made a mistake, but is having trouble locating the last point.
Help him.
## Input
Each of the three poi... | 26,766 |
Cezar
Description:
Mirko has an array of $N$ different words that he
wants to encrypt using a substitution cypher.
We encrypt the text using a substitution cypher by first
choosing a key – a permutation of the English alphabet. Then we
replace all occurrences of letter ‘a’
with the first letter of the... | 26,767 |
Chain & Co.
Description:
Chain & Co. specializes in producing infinitely
strong chains. Because of their high quality products, they are
quickly gaining market share. This leads to new challenges,
some of which they could have never imagined before. Like, for
example, automatic verification of link end... | 26,768 |
Chair Dance
Description:
The first type of command tells each player to
move $x$ chairs
farther in clockwise order, so they must move from
chair $i$ to
chair $i+x$.
The second type of command tells each player to move from
chair $i$ to
chair $i\cdot {}x$.
Both these calculations are done m... | 26,769 |
Chair Game
Description:
Consider a game with $n$ players and $n$ chairs. The chairs will be
arranged in a circle, and each player will sit on a chair.
There is also a bell which will ring some number of times
during the game. Each chair has an integer between $1$ and $n$: the number of steps the player
... | 26,770 |
Chair Hopping
Description:
The latest hit song Chair Hopping
contains instructions for a group dance. To perform the dance,
$n$ performers numbered
from $1$ to $n$ and $n$ chairs numbered from $1$ to $n$ are required. Initially, performer
$i$ is seated in chair
$i$.
When a single hop is performed,... | 26,771 |
Chalmers Coin
Description:
The industrial engineering and management division at
Chalmers have recently invented something they think will
revolutionize money. They have invented a brand new
cryptocurrency called the Chalmers Coin (CC)! To mine a block
of CC you need to find a sufficiently small value ... | 26,772 |
Champagne Overflow
Description:
A champagne pyramid is an arrangement of
coupes (shallow glasses) used for festive occasions
such as wedding receptions or New Year’s celebrations. The
construction is based on the fact that a coupe can be placed on
top of four others coupes, arranged in a symmetric fash... | 26,773 |
Champernowne Count
Description:
The $n$th Champernowne
word is obtained by writing down the first $n$ positive integers and
concatenating them together. For example, the 10th Champernowne
word is “12345678910”.
Given two positive integers $n$ and $k$, count how many of the first
$n$ Champernowne words... | 26,774 |
Champernowne Subsequence
Description:
The $k^{\text{th}}$
Champernowne word is obtained by writing down the first
$k$ positive integers and
concatenating them together. For example, the $10^{\text{th}}$ Champernowne word is
$12345678910$.
It can be proven that, for any finite string of digits,
the... | 26,775 |
Champernowne Substring
Description:
The Champernowne string is an infinite string formed by
concatenating the base-10 representations of the positive
integers in order.
It begins 1234567891011121314…
It can be proven that any finite string of digits will
appear as a substring in the Champernowne string a... | 26,776 |
Champernowne Verification
Description:
The $k^{\text {th}}$
Champernowne word is obtained by writing down the first
$k$ positive integers and
concatenating them together. For example, the $10^{\text {th}}$ Champernowne word is
$12345678910$.
Given a positive integer $n$, determine if it is a Champerno... | 26,777 |
Chanukah Challenge
Description:
The Jewish holiday of Chanukah lasts for eight days and
eight nights. On the evening before each day, candles are lit
in a menorah. On the first evening, one candle is lit, on the
second, two are lit, and so on. However, each evening, an extra
candle, called the shammas,... | 26,778 |
Character Development
Description:
Virtually every single book, play, movie, novel, and game
has at least one character. Most have more, and some even have
thousands! As every good writer knows, the difficulty of
creating a character increases with each new major character
added. This is because fictio... | 26,779 |
Chardonnay
Description:
You wouldn’t usually open a new bottle of wine just for a
single glass. But whenever your dinner recipe calls for wine,
it’s a perfect opportunity to treat yourself to a glass from
the leftover contents. After all, the bottle is already open,
so you might as well enjoy yourself.... | 26,780 |
Charged
Description:
## Background
The electric field $\vec{E}$ of a particle with charge
$q$ can be derived from
its electric potential $V$:
where $\nabla $ is the
derivative operator and $V$ at every point in space
is
where $\vec{r}$ is the
distance from the particle at that point, $1\over 4\p... | 26,781 |
Charles in Charge
Description:
Every day, Charles drives from his home to work and back. He
uses the highways of the country that run from one city to
another. Charles has decided that he wants to help the
environment by buying an electrical car. Electrical cars,
however, are not very common in his cou... | 26,782 |
Charlie the Cockchafer
Description:
Charlie knows how to fly. Despite this, whenever Charlie
wants to move from one point to another, it becomes a tedious
task for him. The main trouble is that Charlie is a cockchafer.
And it is a well-known fact that all cockchafers (do not
confuse them with cockroach... | 26,783 |
Charting Progress
Description:
You’re consulting for a fitness training institute which is
working on becoming more technologically adept. Currently, it
has an old computer which tracks various statistics about
athletes in training. Each day, the athlete logs in and records
a single number, which is in... | 26,784 |
Chasing Subs
Description:
From previous intelligence operations (the details of which
we are not at liberty to reveal to you), it is known that the
messages are likely encrypted with a simple substitution
cipher. In other words, every letter is replaced with another
letter from the alphabet (a letter c... | 26,785 |
Chasing the Cheetahs
Description:
A National Geographic film crew is visiting the ZOO this
week. They are creating a documentary about animal speed and
they would like to film one or more cheetahs running at full
pace. A solitary running cheetah has been filmed successfully
many times. Therefore, the c... | 26,786 |
ChatNOI
Description:
Mary is fascinated by the power of large language models.
With all the recent hype around chat bots and generative AI,
she decided to design her own text generation model called
ChatNOI (Chat, but Not Overly Intelligent).
The model is trained on a large document consisting of
$n$ ... | 26,787 |
Chatter
Description:
Joseph and his friends just love to chat online. Sometimes
they just chat with random people they don’t even know, because
it’s interesting to meet new people. When Joseph has dozens or
hundreds of chat windows open, he sometimes wonders about who
the people he’s chatting with are ... | 26,788 |
Cheaper Drink
Description:
Instead of worrying about the current hyperinflation you
decide to go down to the local bar and have a drink.
The prices at the bar are displayed using magnetic signs
with numbers printed on them, with each magnet showing one or
more digits. For instance, the price of $1106$ meg... | 26,789 |
Cheating Luck
Description:
Donald is playing a game of cards against his cousin
Gladstone. Each round proceeds as follows:
* Donald chooses an (integer) amount of coins and both of
the cousins puts that many coins in the pot.
* The cards are dealt.
* The game is played.
* The player who won gets all th... | 26,790 |
Cheating Students
Description:
You are a member of the “Cohort of Cheating and Sneaky
Students at UCLA” or “CS Students” for short. Your goal? In
every exam, you want to cheat in the most efficient way
possible. The Leader of your cohort is somehow able to acquire
the answers to all the questions five ... | 26,791 |
Cheating a Boolean Tree
Description:
For this problem we will consider a type of binary tree that
we will call a boolean tree. In this tree, every row is
completely filled, except possibly the last (deepest) row, and
the nodes in the last row are as far to the left as possible.
Additionally, every node... | 26,792 |
Cheating at War
Description:
War is a classic and very simple two-player card game played
with a standard $52$-card
deck. The deck is shuffled and split into two equal-sized
piles, one for each player, with cards face down. To play, both
players turn over the top card of their draw pile. The player
... | 26,793 |
Cheats
Description:
Cosmo is busy playing the little-known latest installment in
the Legend of Zelda series of video games, Skyward Wind Mask of
Twilight Time. In this game, the player must complete all
$n$ objectives as the
young adventurer Link. However, some objectives must be done
before others... | 26,794 |
Checkers
Description:
Checkers is played on a square $n \times n$ grid (typically
$n$ equals $8$, $10$, or $12$, but for this problem,
$n$ will range from
$2$ up to $26$). The board has squares colored
red and black, and all pieces move only on the black squares.
Red and Black squares alternate, so... | 26,795 |
Checking Break
Description:
As you already know from the previous problem, ‘Breaking
Cake’, the first round of the Hunter Exam has begun.
The following paragraphs are copied from the problem
statement of ‘Breaking Cake’:
The first round of the Hunter Exam is a real-life problem
solving test: Each candi... | 26,796 |
Checking For Correctness
Description:
In mathematics, it’s always important to check your work.
Usually, this means making some sort of quick calculation
(either in your head, or on paper) to ensure that the answers
you find make sense.
Your colleague has written an implementation of a general
arithme... | 26,797 |
Checkmate in One
Description:
Chess has been a long time passion of Yraglac. He spents at
least an hour per day playing chess matches online or reading
chess tactics books. The game is played by two players on an
$8 \times 8$ grid, with
each player taking turns to move a piece.
In this problem, we wil... | 26,798 |
Checkout
Description:
You recently started playing darts and want to learn the
“$501$” variant.
Players take turns throwing three darts; the aim is to
reduce your score from $501$ to $0$. The darts board contains of
slices numbered $1$ to
$20$, with the obvious
scoring rule: when your dart hits $1... | 26,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.