task stringlengths 0 154k | __index_level_0__ int64 0 39.2k |
|---|---|
Message
Description:
In the city where Paula lives, there is a large square. The
square can be represented as a grid with $N$ rows and $M$ columns. Some of the grid cells
contain engraved letters.
According to a legend, these letters form a message if one
walks on the cells in a specific order. To make it... | 28,800 |
Messages from Outer Space
Description:
A somewhat less glamorous task then that of Agent Fox Mulder
in the X-files is to analyze signals from outer space in search
of messages from possibly subversive extra-terrestrials. Work
of this sort is carried out at FBI’s “Cosmic Ear” division
(Motto: “I want to... | 28,801 |
Messenger
Description:
Misha needs to send packages to his friend Nadia. Both of
them often travel across Russia, which is very large. So they
decide to hire a messenger. Since the cost of the messenger
service depends on the time it takes to deliver the package,
they need your help to optimize a littl... | 28,802 |
Messy lists
Description:
Doris has just started to program, and is participating in
their first programming competition. She has encountered a
problem that can be solved by sorting some cool integers. She
decides to use the built-in sorting function in the
revolutionary new programmering language Meows... | 28,803 |
Metal Processing Plant
Description:
Yulia works for a metal processing plant in Ekaterinburg.
This plant processes ores mined in the Ural mountains,
extracting precious metals such as chalcopyrite, platinum and
gold from the ores. Every month the plant receives $n$ shipments of unprocessed ore.
Yulia n... | 28,804 |
Metaprogramming
Description:
EIGER is a brand-new, made-up computer language. It’s very
exciting, and very simple! EIGER only allows the programmer to
do two things: define a name for an integer, and compare two
names. Write a metaprogram – a program which can simulate the
EIGER language.
## Input
In... | 28,805 |
Methodic Multiplication
Description:
The Peano axioms (named after Italian mathematican Giuseppe
Peano) are an axiomatic formalization of the arithmetic
properties of the natural numbers. We have two symbols: the
constant $0$, and a unary
successor function $S$.
The natural numbers, starting at $0$... | 28,806 |
Metro Mapping
Description:
Mario is currently visiting the Metro Kingdom.
Unsurprisingly, he is looking forward to taking the metro to
travel across the kingdom. The metro has $M$ stations and $N$ train lines. Each line
$i$ passes through a
subset $S_ i$ of the
$M$ stations, and when
Mario is r... | 28,807 |
Metronome
Description:
A Metronome is a mechanical device used by
musicians for keeping time. It is a very clever device, based
on a spring, an inverted pendulum, and an escapement gear. Milo
is learning to play the glockenspiel, and has purchased a
metronome to help him keep time. Milo has noticed tha... | 28,808 |
Mia
Description:
Instead, a roll is scored as follows:
* Mia ($12$ or
$21$) is always
highest.
* Next come doubles ($11$, $22$, and so on). Ties are broken
by value, with $66$
being highest.
* All remaining rolls are sorted such that the highest
number comes first, which resu... | 28,809 |
Micro-Row
Description:
You are studying $N$
microbes. The $i^\text
{th}$ microbe has initial x-coordinate $P_ i$ nanometers and will travel
$S_ i$ nanometers in the
positive x-direction each second.
All these x-coordinates are initially distinct. You know
that these microbes are incredibly amorpho... | 28,810 |
Mid Card
Description:
The witch Yubaba has forced Sen to play a card game to when
back her and her parents’ freedom. Cards range from
$1$ to $C$. Sen has an infinite number of
cards for each possible value. In this game, there are
$N$ rounds. Within each
round $i$, Sen can win by
playing a card... | 28,811 |
Milestone Counter
Description:
Driving through the Irish countryside, one frequently sees
enigmatic small grey stones sitting by the wayside, spaced
about a kilometre and a half apart. As it turns out, these
stones once had a purpose: they were milestones,
intended to demarcate this venerable unit of m... | 28,812 |
Milk Tea Battle
Description:
In the year 2020, to popularize computer programming amongst
the wizard world, Hogwarts School of Witchcraft and Wizardry
has invited professor Hanh to teach a new subject ‘Computer
Programming’.
To make his class more exciting, professor Hanh has brought
an infinite amoun... | 28,813 |
Millifærsla
Description:
Bjarki forgot his wallet when he went out to eat with
Hlynur. Hlynur paid for him and told Bjarki that he could use
the service Monnei to pay it back. Bjarki thought
Monnei had the highest transaction fee, higher than the other
services Fjee and Dolladollabilljoll. He told
... | 28,814 |
Millionaire Madness
Description:
A close friend of yours, a duck with financial problems, has
requested your help with a matter that will help him pay off
his debts. He is the nephew of an extremely wealthy duck, who
has a large vault, filled with mountains of coins. This wealthy
duck has a certain coi... | 28,815 |
Mine the Gradient
Description:
If we need to be prepared for the possible danger of an
alien invasion, the first thing to do is to find out where can
they come from. One way to determine if a planet is inhabited
by intelligent creatures is to study high resolution pictures
of planets trying to find typ... | 28,816 |
Minecraft Dungeons
Description:
During the COVID-19 quarantine, Theta discovered Minecraft
Dungeons which is an offshoot of the popular Minecraft game. In
Minecraft Dungeons, players crawl through a dungeon, trying to
accomplish a mission without getting killed by various mobs. At
the end, a boss battl... | 28,817 |
Minequake
Description:
The fully autonomous microbreweries installed in the
abandoned Dwarven mines of Moravia are truly a testament to the
ingenuity and craftsmanship of Dwarven engineering! Alas,
sometimes earthquakes rattle the mines, leading to misaligned
pipes and funnels spilling precious liquid ... | 28,818 |
Mineral deposits
Description:
You handle signal processing for an extra-terrestrial mining
company, and your vessel is currently approaching an asteroid.
Preliminary scans show the presence of $k$ mineral deposits on the
asteroid, but their precise locations are unknown.
The surface of the asteroid can be... | 28,819 |
Minesweeper
Description:
Arnar is extremely skilled at Minesweeper, he’s been playing the game since
1989. His friend Bjarki keeps telling him that this isn’t
impressive at all.
Bjarki took this to heart and immediately started traning at
Minesweeper.
After many weeks of training Bjarki hadn’t gotten any... | 28,820 |
Minesweeper Squared
Description:
If you are unfamiliar with the rules of Minesweeper, here is
a description:
* Each of the red-labelled cells is either empty or
contains a mine. All other cells are empty.
* Each cell with a blue $1$ is adjacent to
exactly one mine. Two cells are said to be
... | 28,821 |
Mini Battleship
Description:
Battleship is a game played by two players. Each
player has their own grid, which is hidden from their opponent.
Each player secretly places some ships on their grid. Each ship
covers a horizontal or vertical straight line of one or more
contiguous squares. Ships cannot ove... | 28,822 |
Miniature Golf
Description:
A group of friends has just played a round of miniature
golf. Miniature golf courses consist of a number of holes. Each
player takes a turn to play each hole by hitting a ball
repeatedly until it drops into the hole. A player’s score on
that hole is the number of times they ... | 28,823 |
Minimal Fibonacci Sums
Description:
All positive integers can be written as a sum of Fibonacci
numbers (for example, the trivial solution $1 + 1 + 1 + \dots + 1$). A harder
problem is to write it as the sum of as few Fibonacci numbers
as possible. For example, $7$ can be written as $2 + 5$, while $12$ requ... | 28,824 |
Minimum Cost Flow
Description:
You have been hired to construct a system to transport water
between two points in an old factory building using some
existing components of the old plumbing. The old components
consist of pipes and junctions. Junctions are points where pipes may have
previously been join... | 28,825 |
Minimum Cost Maximum Flow
Description:
## Input
The first line of input contains a line contains a line with
four non-negative integers, $2
\le n \le 250$, $0 \le m
\le 5\, 000$, $0 \le s \le
n-1$ and $0 \le t \le
n-1$, separated by single spaces, where $n$ is the numbers of nodes in the
graph... | 28,826 |
Minimum Cut
Description:
Given a directed weighted graph and two vertices
$s$, $t$, the goal is to find a subset
$U$ of the vertices such
that $s \in U$,
$t \not\in U$, and the
weight of edges from $U$
to $\overline{U}$ is
minimized.
## Input
The first line of input contains four non-nega... | 28,827 |
Minimum Scalar Product
Description:
You are given two vectors $v_1=(x_1,x_2,\ldots ,x_ n)$ and
$v_2=(y_1,y_2,\ldots ,y_
n)$. The scalar product of these vectors is a single
number, calculated as $x_1y_1+x_2y_2+\ldots +x_ ny_ n$.
Suppose you are allowed to permute the coordinates of each
vector as you ... | 28,828 |
Minimum Spanning Tree
Description:
## Input
The input consists of several test cases. Each test case
starts with a line with two non-negative integers, $1 \le n \le 20\, 000$ and
$0 \le m \le 30\, 000$,
separated by a single space, where $n$ is the numbers of nodes in the
graph and $m$ is the
numb... | 28,829 |
Minimum Weighted Vertex Cover
Description:
The Minimum Weighted Vertex Cover (MWVC) problem is to find the vertex cover with
the minimum sum of weights of a particular given graph.
Your program should take as input a single MWVC instance. It
will be run several times, once for every test case. The time
li... | 28,830 |
Mining Race
Description:
Notch is holding a race for Steve and Alex to see who is the
better miner. The rules are simple: they must each move
$n$ blocks forward and
$n$ blocks down. They can
do this in any order they choose—that is, they each mine
$2n$ times ($n$ blocks in front of them and
$n$... | 28,831 |
Ministry of Magic
Description:
Many countries have a system of government where the
parliament chooses the prime minister, who then forms a
government. Generally, the parliament needs to elect the prime
minister by majority vote. When no single party manages to get
a majority in parliament, parties hav... | 28,832 |
Minor Setback
Description:
You are developing a smartphone app that converts audio
recorded from an instrument into sheet music. You already have
the code to record the audio and convert it into sequence of
frequency values. What is left is to translate those
frequencies into pitch names more easily re... | 28,833 |
Mirinae
Description:
There are $N$ planets
in Vita’s galaxy. In order to improve the security of the
planets, Vita assigned each planet to guard exactly one other
planet. In particular, the $i$-th planet guards the $A_ i$-th planet for every
$1 \le i \le N$.
Vita wants to construct a protective barrie... | 28,834 |
Mirror Images
Description:
Atrebla is developing a new smartphone camera app that she
believe will be the next big hit on the app store. Camera apps
usually display the image mirrored left-to-right on the screen,
so that what you see on the screen matches the movement of your
face. To help her camera a... | 28,835 |
Mirror Strings
Description:
A character is called a “mirror character” if it looks the
same when flipped up and down, and the same when flipped left
and right. The uppercase mirror characters, H, I, O, X. The lowercase
mirror characters are l (since people
often write this as a vertical line), o, and x... | 28,836 |
Mirror, Mirror...
Description:
Mirror, mirror, on the wall, which mirror symmetric subset
of these points is the largest of them all?
The set $P$ consists of
$N$ points. We say that a
subset $S \subseteq P$ is
mirror symmetric if there exists a line $\ell $ such that for each point
$p \in S$, the ... | 28,837 |
Misa
Description:
A nice part of the Roman Catholic Mass is the rite of peace
when people shake hands with their neighbours and say “peace be
with you”. Mirko has found a way to turn this ritual into his
own favor. Inside the church, there are $R$ rows of benches where each row can
hold a capacity of $... | 28,838 |
Missing Gnomes
Description:
A family of $n$ gnomes
likes to line up for a group picture. Each gnome can be
uniquely identified by a number $1..n$ written on their hat.
Suppose there are $5$
gnomes. The gnomes could line up like so: $1, 3, 4, 2, 5$.
Now, an evil magician will remove some of the gnomes fro... | 28,839 |
Missing Number
Description:
You are teaching kindergarten! You wrote down the numbers
from $1$ to $n$, in order, on a whiteboard. When
you weren’t paying attention, one of your students erased one
of the numbers.
Can you tell which number your mischievous student
erased?
## Input
The first line of i... | 28,840 |
Missing Number
Description:
Kirby has written down all the integers from $a$ to $b$ in order. He wrote them down as
one big string, with no spaces between them and no leading
zeroes, and he didn’t tell you the values of $a$ and $b$!
Because Kirby was hungry, he ate one of the numbers. Can you
figure out w... | 28,841 |
Missing Numbers
Description:
You enjoy your new job as a teacher of young children. It’s
fun to see them learning to count, recognize letters, draw, and
interact with the world.
One common problem you’ve noticed is that children often
forget numbers when counting. For example, early on they might
coun... | 28,842 |
Mission Improbable
Description:
It is a sunny day in spring and you are about to meet
Patrick, a close friend and former partner in crime. Patrick
lost most of his money betting on programming contests, so he
needs to pull off another job. For this he needs your help,
even though you have retired from ... | 28,843 |
Mixed Fractions
Description:
You are part of a team developing software to help students
learn basic mathematics. You are to write one part of that
software, which is to display possibly improper fractions as
mixed fractions. A proper fraction is one where the numerator
is less than the denominator; a ... | 28,844 |
Mixed-Base Arithmetic
Description:
The Perl programming language makes it easy to implement
counters that mix numeric and alphabetic characters. Lower-case
letters behave as if they are a base-$26$ digit counting from a up to z, upper-case
letters behave as if they are a base-$26$ digit counting from A up ... | 28,845 |
Mixing Colours
Description:
Frank lives in London and he really likes games and maths.
Lately, he has been playing a game on his mobile phone. It is
simple, a sequence of coloured tokens is provided and each turn
the player has to combine a pair of adjacent tokens to obtain a
new token of certain colou... | 28,846 |
Mixing Drinks
Description:
Pia is a famous bartender at the hip Stockholm night club
Supernova. One of her most impressive feats is the mixing a
series of drinks using each of the $N$ distinct drink ingredients in the
bar exactly once. She does this in the following way.
First, Pia chooses a number of dri... | 28,847 |
Mixtape Management
Description:
Mary has created a mixtape with her favourite reggae tracks.
The mixtape consists of a list of MP3 files on her computer
that she wants to share with her friends Wendy and Larry.
However she knows that her friends have different musical
tastes and will therefore also hav... | 28,848 |
Miyazaki's Masterpiece
Description:
Hayao Miyazaki is putting together another timeless classic,
and he has decided to directly incorporate the desires of his
fans into his next masterpiece. His movie consists of
$N$ scenes where each
scene is meant to convey a certain emotion. It is widely known
t... | 28,849 |
Miði
Description:
Little Jón has a crush on little Gunna. He intends to send
her a note in the middle of class at school. The note will pass
through the hands of many students to reach from Jón to Gunna.
There is also a risk that the teacher will see the note and
confiscate it. Jón is worried that his ... | 28,850 |
Mjehuric
Description:
Goran has five wooden pieces arranged in a sequence. There
is a number between $1$
and $5$ inscribed on every
piece, so that every number appears on exactly one of the five
pieces. Goran wants to order the pieces to form the sequence
$1, 2, 3, 4, 5$ and does
it like this:
... | 28,851 |
Mobilization
Description:
Mobilization is a brand new strategy game in which you are
required to mobilize an army. The army can consist of different
types of troops, each of which has a cost, health, and potency.
You can acquire any combination of the troop types, even
fractional, such that the total c... | 28,852 |
Modelling Problems
Description:
Sometimes, Atrebla just wants to know if her code’s
assertions can ever be false. Of course, this is somewhat of an
undecidable problem in the general case — there is a very
simple way to turn any program that solves this problem into
one that solves the halting problem.... | 28,853 |
Moderate Pace
Description:
An ultra-marathon is a race that takes place over an
uncomfortably long distance and time, typically lasting for
five hours or more. You are part of a group of three
ultra-marathon runners looking to place in this year’s Great
South-to-North run from Plymouth to Aberdeen.
Yo... | 28,854 |
Modified Gray Code
Description:
We want to modify the Gray Code so that successive elements
differ by an even number of bits, but again the bits selected
to be changed should yield the smallest normal binary value not
yet used. We call this the even Gray code. Here are the first 3
elements of the 5-bit... | 28,855 |
Modular Arithmetic
Description:
## Input
There are several test cases. Each test case begins with a
line containing two integers $n,
t$, where $1 \leq n \leq
10^{18}$, and $0 \leq t
\leq 100$.
Then follow $t$
operations to perform, each of the form $x\ \mbox{op}\ y$. Here, $0 \leq x, y < n$ are i... | 28,856 |
Modulo
Description:
Given two integers $A$
and $B$, $A$ modulo $B$ is the remainder when dividing
$A$ by $B$. For example, the numbers
$7$, $14$, $27$ and $38$ become $1$, $2$, $0$ and $2$, modulo $3$. Write a program that accepts
$10$ numbers as input and
outputs the number of distinct numbers in ... | 28,857 |
Modulo Data Structures
Description:
You have an array, $Arr[1...N]$. Initially, all values of
$Arr[i] = 0$. The array
supports the following two types of queries:
* Increase all $Arr[k]$ by $C$ for all $k\equiv A\ (\mathrm{mod}$
$B)$;
* Output $Arr[D]$ for
a given $D$.
Increase all $Arr[k]$ by $C$ f... | 28,858 |
Modulo Solitaire
Description:
Modulo Solitaire is a game that can be played when you are
bored. You can even play it without a phone, just on paper.
First, you pick a number $m$. Then you pick two sequences of
numbers $a_{i}$ and
$b_{i}$. Finally, you pick
a starting number $s_{0}$.
Now, your g... | 28,859 |
Molecules
Description:
A molecule consists of atoms that are held together by
chemical bonds. Each bond links two atoms together. Each atom
may be linked to multiple other atoms, each with a separate
chemical bond. All atoms in a molecule are connected to each
other via chemical bonds, directly or indi... | 28,860 |
Molekule
Description:
Scientists in a chemical lab in Croatia have been studying
the chemical bonds between different molecules. They have a
special interest in a group of molecules of the chemical
compound nitro hydrogen laminate. The compound consists of
$N$ molecules bound
together by $N - 1$
... | 28,861 |
Money Matters
Description:
Our sad tale begins with a tight clique of friends. Together
they went on a trip to the picturesque country of Molvania.
During their stay, various events which are too horrible to
mention occurred. The net result was that the last evening of
the trip ended with a momentous e... | 28,862 |
Money Transfers
Description:
Sonia is the CEO of the South Western Economic Research
Consortium (SWERC). The main asset of SWERC is a group of banks
spread out in several countries, which specialize in wire
transfers between these countries.
Money is transferred between banks which have transfer
agree... | 28,863 |
Money for Nothing
Description:
In this problem you will be solving one of the most profound
challenges of humans across the world since the beginning of
time – how to make lots of money.
You are a middleman in the widget market. Your job is to buy
widgets from widget producer companies and sell them to wi... | 28,864 |
Monitoring Ski Paths
Description:
Fresh powder on a sunny day: it is a great time to ski!
Hardcore skiers flock to a large mountain in the Rockies to
enjoy these perfect conditions. The only way up the mountain is
by helicopter; skiers jump out and ski down the mountain.
This process sounds a bit chaotic,... | 28,865 |
Monochromatic Minesweeper
Description:
In the game of minesweeper you are given a rectangular grid
of a particular size. At the beginning of the game, the
contents of all cells are hidden. The player can reveal the
content of a cell by clicking on it. Some cells contain mines,
and all other cells conta... | 28,866 |
Monopoly
Description:
Doris is playing monopoly with her friends, and it is now
her turn to roll the dice. In standard monopoly you roll two
$6$-sided dice, and then
walk the same number of steps as the sum of the two dice. From
her current position, she will end up on her opponents’ hotels
if the ... | 28,867 |
Monotony
Description:
You are given an $r\! \times
\! c$ grid. Each cell of this grid is filled with a
number between $1$ and
$r{\cdot }c$ inclusive,
and each cell’s number is distinct.
Define a grid of numbers to be monotonic if each row and column is either
increasing or decreasing (this can be ... | 28,868 |
Monument Maker
Description:
You are a stone-chiseler in Ancient Greece, charged with
copying the text from famous monuments onto new stones. The
existing inscriptions use boustrophedon writing, in
which the lines of text alternate direction, and if a line ends
in the middle of a word, the word simply c... | 28,869 |
Moogle
Description:
You got the original idea of making map software, called
Moogle Maps, for the new cool Maple mPhone. It will even be
capable of indicating the location of a house address like
“Main Street 13”. However, since the mPhone has limited storage
capacity, you need to reduce the data amoun... | 28,870 |
Moonfrost Canyon
Description:
Karin has three favourite things in life – fine dining, cats
and a video game called Moonfrost Canyon. In the game,
you play as a farmer who got tired of city life to move out to
a farm together with your cat. At the farm, you then grow crops
that you can cook fancy meals ... | 28,871 |
Morse Code Palindromes
Description:
A Palindrome is a word, number,
phrase, or other sequence of characters which reads the same
backward as forward, such as madam or
racecar or 1881. Phrase palindromes ignore capitalization,
punctuation, and word boundaries. For example: Madam I’m Adam.
Morse code is... | 28,872 |
Mosaic
Description:
In this problem, we consider a special class of tile
mosaics, as exemplified in Figure 1. Each such mosaic is
built on a rectangular grid with a white background. Within
each cell of the grid is either a square black tile, a
triangular black tile in one of the four orientations show... | 28,873 |
Mosaic Browsing
Description:
The International Center for the Preservation of Ceramics
(ICPC) is searching for motifs in some ancient mosaics.
According to the ICPC’s definition, a mosaic is a
rectangular grid where each grid square contains a colored
tile. A motif is similar to a mosaic but some of th... | 28,874 |
Moscow Dream
Description:
For many students, getting a ticket to The ICPC World Finals
is a huge achievement, and The 2019 ICPC
Asia Danang Regional Contest is a chance to make their
dream come true. For some others, they just like to stretch
their brains and solve interesting problems.
We – the scien... | 28,875 |
Mosquito Multiplication
Description:
The mosquito life cycle includes four stages: egg, larva,
pupa, and adult. For simplicity, we will make several
assumptions that are not quite true in the nature: The egg
stage lasts less than one day, and all the other stages are one
week long. Each mosquito lives ... | 28,876 |
Most Difficult
Description:
You are an expert on the most difficult field of math —
primes! Indeed, you have actually proven the Riemann
Hypothesis, but unfortunately, this margin is too narrow to
contain the proof.
Being considered a prime expert, $q$ people have come to you for help.
The $i$-th pers... | 28,877 |
Mountain Biking
Description:
Mount Snowdon, the tallest place in Wales, is a major
attraction for mountain bikers far and wide. To take advantage
of the popularity of this thrilling sport, an enterprising new
venture plans to open several new bike repair shops throughout
the rolling foothills.
The cun... | 28,878 |
Mountain Road
Description:
In the Franconian Switzerland, there is a narrow mountain
road. With only a single lane, this is a bottleneck for two-way
traffic. Your job is to schedule incoming cars at both ends so
that the last car leaves the road as early as possible.
Each car is specified by three values:... | 28,879 |
Mountain Scenes
Description:
An artist begins with a roll of ribbon, one inch wide. She
clips it into pieces of various integral lengths, then aligns
them with the bottom of a frame, rising vertically in columns,
to form a mountain scene. A mountain scene must be uneven; if
all columns are the same hei... | 28,880 |
Mountain Village
Description:
After a long summer’s march through the rough terrain of
northern America, the indian tribe had found a place where they
hopefully would be left alone. The chief proclaimed that this
would be the new place for their village, despite the rocky
nature of the landscape. They ... | 28,881 |
MountainCraft
Description:
It’s a glorious day in the video game meta-world of
MountainCraft! True to its name, MountainCraft boasts an
expansive open world full of mountains to explore. Your avatar
in the game wakes up on a remote island, and stares at the
mountains on the horizon.
The view of the ho... | 28,882 |
Mountainous Landscape
Description:
You travel through a scenic landscape consisting mostly of
mountains—there are $n$
landmarks (peaks and valleys) on your path. You pause for
breath and wonder: which mountain are you currently seeing on
the horizon?
Formally: you are given a polygonal chain $P_1 P_2 ... | 28,883 |
Mountainous Palindromic Subarray
Description:
An array is Mountainous if it is strictly
increasing, then strictly decreasing. Note that
Mountainous arrays must therefore be of length three
or greater.
A Subarray is defined as an array that can be
attained by deleting some prefix and suffix (possibly e... | 28,884 |
Mouse Pursuit
Description:
Brandon is playing the newest idle game, Mouse Pursuit! The
goal of this game is to pursue mice for cheese and glory.
In Mouse Pursuit, an event consists of pursuing a
mouse. If the mouse is caught, the player might earn cheese and
glory. However, if the mouse is not caught, the... | 28,885 |
Mouse Trap
Description:
Medea the cat is a real troublemaker. Even though she is
loving and caring with humans, sometimes she likes to crash on
mouse parties in the field nearby her house, uninvited, just
for the fun of it!
A mouse party is a bunch of mice standing on the vertices of
a convex polygon ... | 28,886 |
Moveable maze
Description:
After solving a difficult programming problem, you decide to
take a break and play a puzzle game. After playing the game for
a while, you decide to write a program to solve it for you.
The game is played on a grid with $R$ rows and $C$ columns. Each square of the grid
contains a... | 28,887 |
Movie Collection
Description:
Mr. K. I. has a very big movie collection. He
has organized his collection in a big stack. Whenever he wants
to watch one of the movies, he locates the movie in this stack
and removes it carefully, ensuring that the stack doesn’t fall
over. After he finishes watching the m... | 28,888 |
Movie Night
Description:
You’re trying to organize an outing to a movie with a group
of friends. This is made complicated by the fact that your
friends will decide whether to come based on who else is
coming. If you give one of your friends a call, you know you’re
going to have a conversation like this... | 28,889 |
Moving Day
Description:
It’s that time of the year when students head back to
school, which will usually involve moving lots of stuff, and
packing lots of that stuff into boxes. However, before we go
through that effort, it would be nice to know whether the boxes
we have are the right size!
A box has ... | 28,890 |
Moving Pianos
Description:
A piano tuner indeed has a hard time earning his living.
(Un)fortunately, most people want their pianos tuned only when
they move to a new place, and thus also someone to help them
move the piano. Therefore, quite a few piano -tuners combine
their profession with lifting and ... | 28,891 |
Moving to Nuremberg
Description:
One of the most important inventions for modern-day city
life is the public transportation. However, most people
probably do not think of it that way – even though it makes
travel in the city a lot easier, we generally want to spend as
little time as possible on the sub... | 28,892 |
Mr. Noodle
Description:
To make the dishes interesting, Mario arranges the straight
noodles into convex polygon shapes. To serve the dish, Mario
wants to plate the polygon on the smallest possible plate, for
aesthetic purposes.
Mario has $N$ pieces of
straight noodles, with length $a_
i$, for $i=1... | 28,893 |
Mr. Plow King
Description:
In the kingdom of Winterfield, there are several cities and
each pair of cities is connected by exactly one old dirt road.
The king of Winterfield has decided that he will upgrade some
of those roads. The set of roads that he upgrades must be such
that it is possible to get f... | 28,894 |
MrCodeFormatGrader
Description:
Instructor Bob is building an automatic source code
formatting grading website. The name of the website is
“MrCodeFormatGrader”. When you run Bob’s program and submit
your source code to it, the program will output $C$, the number of lines of source
code; $N$, the number... | 28,895 |
Mravi
Description:
Little Bobi gets up every morning and feeds his favourite
pets: ants. He keeps them in a terrarium with a pipe system
that can be represented as a tree with $N$ nodes. The pipes are represented
by the edges of the tree. The root of the tree is located at
node denoted with 1. Inside t... | 28,896 |
Mravi
Description:
Little Bobi gets up every morning and feeds his favourite
pets: ants. He keeps them in a terrarium with a pipe system
that can be represented as a tree with $N$ nodes. The pipes are represented
by the edges of the tree. The root of the tree is located at
node denoted with $1$.
In... | 28,897 |
Mravojed
Description:
Archeologists recently found the remains of Greco-Roman
architecture. The location can be modeled as a grid of
$R \cdot C$ square cells.
For each of the cells, archeologists have determined if some
building was there or if the cell has always been empty.
After examining the artif... | 28,898 |
Muddy Hike
Description:
Liam is planning out his route for an upcoming nature hike.
Unfortunately, the region that he plans on hiking through is
notoriously muddy, so in order to prevent his floral shirt from
getting covered with mud, he has decided to pick a route for
which the maximum depth of mud en... | 28,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.