task stringlengths 0 154k | __index_level_0__ int64 0 39.2k |
|---|---|
Palindromic DNA
Description:
A DNA sequence is composed of a series of four possible
nucleobases, namely Adenine, Guanine, Thymine and Cytosine; we
will refer to each of these bases by their initial. For our
purposes, nucleobases have an associated cyclic “order”:
A is followed by G, which in turn is f... | 29,100 |
Palindromic Naming
Description:
Yraglac is expecting to have a child in the near future.
Being a mathematically-minded person, he would like his child’s
name to be a palindrome – that is, reads the same when read
forward and backward. Given a name, he would like to count the
number of ways he can creat... | 29,101 |
Palindromic Password
Description:
The IT department at your school decided to change their
password policy. Each password will have to consist of
$N$ $6$-digit numbers separated by dashes,
where $N$ will be
determined by the phase of the moon and the weather forecast
for the day after it will be ge... | 29,102 |
Palindromic Word Search
Description:
Given a rectangular grid of uppercase letters, find a
rectangular region of the grid of maximum possible area such
that there is a horizontal palindrome spanning some row of the
rectangular region and a vertical palindrome spanning some
column of the rectangular reg... | 29,103 |
Pallatölur
Description:
Palli loves prime numbers but his favourite numbers are even
prime numbers. Palli received numbers from his grandmother as a
birthday present, but he only wants to hold on to his favourite
numbers. The set of numbers his grandmother bought included all
the integers from $a$ to
... | 29,104 |
Paludarium
Description:
Feeling lonely in his apartment since he is quarantined
inside at the moment, Bob decided to make use of the fish tank
left by the previous renter to set up a little paludarium (a
semi-aquatic habitat that combines land and water environments)
and fill it with little creatures t... | 29,105 |
Panda Chess
Description:
In the city of Pandaville, the predominant black and white
colours of the inhabitants have somehow made chess a very
popular game in the area. There are a total of $N$ chess players in the city and they
are very competitive. Recently, the annual Panda Chess
Tournament has just ... | 29,106 |
Panda Preserve
Description:
Last month, Sichuan province secured funding to establish
the Great Panda National Park, a natural preserve for a
population of more than $1\,
800$ giant pandas. The park will be surrounded by a
polygonal fence. In order for researchers to track the pandas,
wireless rece... | 29,107 |
Pandemic Shopping
Description:
In response to the COVID-19 pandemic, most retail stores instituted
a variety of restrictions on customer behaviour in order to
comply with government social/physical distancing rules. In
particular, many stores placed arrow markers on aisle floors to
direct the flow of c... | 29,108 |
Paper Snowflakes
Description:
To make a paper snowflake, you fold a sheet of paper in
various places and then cut some parts out of the folded sheet.
When you unfold the sheet, it can make a very nice pattern.
That is, if the folds and cuts are chosen well.
Samantha has recently taken up this hobby but wi... | 29,109 |
Parades
Description:
In The City of Eternal Festivities, there are $n$ street junctions and $n - 1$ bidirectional streets, each
street connecting two of the junctions. Between every two
junctions, there is exactly one (direct or indirect) path
connecting them. No junction is an endpoint for more than
$... | 29,110 |
Paradox With Averages
Description:
Note that this is an easier version of the problem
averageshard.
One well-known joke goes as follows: If a bad Computer
Science student drops out of college and goes to a different
college to study Economics instead, he will increase the
average intelligence on both ... | 29,111 |
Paradox With Averages (Hard)
Description:
Note that this is a harder version of the problem
averageseasy.
One well-known joke goes as follows: If a bad Computer
Science student drops out of college and goes to a different
college to study Economics instead, he will increase the
average intelligence on... | 29,112 |
Parakoopa Projectile
Description:
There are $N$
Parakoopas scattered across the first quadrant of the Cartesian
plane (positive $x$ and
$y$ coordinates), and
Mario stands at the origin, located at $(0,0)$, waiting to put a well-known
proverb to the test. He wants to hit two parakoopas (he’s fine
... | 29,113 |
Parallel Analysis
Description:
Today’s computer architectures are moving away from single
processing cores toward multiple cores. Due to this shift, many
computer programmers are honing their parallel programming
skills to take advantage of new hardware capabilities.
Writing efficient parallel programs ca... | 29,114 |
Parent Gap
Description:
In North America, and in many countries around the world,
Mother’s Day is celebrated on the second Sunday in May, and
Father’s Day is celebrated on the third Sunday in June. The
interval between Mother’s Day and Father’s Day in any
particular year, sometimes referred to as the p... | 29,115 |
Parket
Description:
Ivica has set up a new parquet flooring in his room. The
room is $L$ decimeters
long and $W$ decimeters
wide.
The blocks are of quadratic shape and each has an area of
one quadratic decimeter. Once Ivica had set up the flooring,
which consists of brown-colored blocks, he decide... | 29,116 |
Parking
Description:
Long Street is a straight line, where all positions are
integer. You pay for parking in a specific slot, which is an
integer position on Long Street. Michael does not want to pay
for more than one parking though. He is very strong, and does
not mind carrying all the bags around.
#... | 29,117 |
Parking
Description:
Having dropped out of school because of chemistry, Luka got
a job driving trucks. One evening he parked his three trucks in
a rest area which charges for parking in an unusual way – they
give a discount on quantity.
When only one truck is parked, the driver pays $A$ kuna per minute. W... | 29,118 |
Parking Lot
Description:
Imagine you are walking across a parking lot of $r$ rows and $c$ columns of parking spots. All
parking spots have a size of a unit square. A parking spot
either is empty or contains a parked car. You can walk across
an empty parking spot in any direction, but can only walk along
... | 29,119 |
Parovi
Description:
The distance between two integers is defined as
the sum of the absolute result of subtracting their
digits. For example, the distance between the numbers 4561 and
3278 is $|4 - 3| + |5 - 2| + |6 -
7| + |1 - 8| = 12$. If one of the numbers consists of
fewer digits than the other,... | 29,120 |
Parovi
Description:
Mirko and Slavko are playing a game. Mirko’s turn is first
and he chooses a non-empty set of pairs of numbers between
$1$ and $N$ (inclusive) under the condition
that the numbers that comprise a pair are mutually relatively
prime. The numbers that comprise a pair must be different. ... | 29,121 |
Parsing Hex
Description:
This problem is simple. Just search the input for
hexadecimal numbers, and print any numbers you find in both
hexadecimal and decimal format.
## Input
Input is a sequence of at most $100$ text lines, ending at end of
file. Each line has at most 100 characters, and may contain one... | 29,122 |
Partial Linear Equation Solver
Description:
## Input
There are several test cases. Each test case begins with a
line containing an integer $n$, where $1 \leq n \leq 100$.
Then follow $n$ lines,
each containing $n$
floating point numbers. The $j$:th number on the $i$:th row gives the entry
$a_{i,j}$ o... | 29,123 |
Particle Collision
Description:
Particle colliders are difficult to build and experiments
are costly to run. Before running any real experiments it is
better to do a simulation to test out the ideas first. You are
required to write a very simple simulator for this problem.
There are only three particles i... | 29,124 |
Particle Swapping
Description:
The research team of prof. Feynmansson is preparing a new
groundbreaking experiment in particle physics. On a special
plate they have prepared a system consisting of a number of
nodes connected via wires1. In the
beginning of the experiment a pair of particles appears at ... | 29,125 |
Party Game
Description:
Lord Kevin (purportedly a distant relative of Lord Kelvin)
is holding a party to celebrate his recent entrance into the
British nobility. The exact process whereby Kevin acquired his
title is a matter of some dispute, and there are even whispered
rumours of identity theft, but f... | 29,126 |
Pascal
Description:
Little Frane is already in tenth grade, but is still
struggling with Pascal in computer class. For homework, his
teacher wrote the following program into his notebook, and he
needs to determine the output, given the integer $N$.
```
readln(N);
counter := 0;
for i := N - 1 downto 1 do b... | 29,127 |
Pascal Meets Boole
Description:
Many people are familiar with Pascal’s Triangle, a
triangular arrangement of integers named after the French
mathematician and philosopher Blaise Pascal (1623–1662). If we
number the rows of Pascal’s Triangle $1, 2, 3, \ldots ,$ starting from the
top, then row $r$ contai... | 29,128 |
Pascal Multiple
Description:
The $(i,j)$th binomial
coefficient, denoted $C(i,j)$, is the (zero-indexed)
$j$th entry of the
(zero-indexed) $i$th row
in Pascal’s triangle:
```
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
...
```
where $C(0,0) = 1$ and
the $(i+1)$st row can be
computed from the $i$th
row ... | 29,129 |
Pascal's Hyper-Pyramids
Description:
We programmers know and love Pascal’s triangle: an array of
numbers with $1$ at the
top and whose entries are the sum of the two numbers directly
above (except numbers at both ends, which are always
$1$). For programming this
generation rule, the triangle is bes... | 29,130 |
Pasijans
Description:
Pasijans, patience, or solitaire is the name for a group of
single player card games. One new such game, so new it has no
name, is played with cards sporting random integers as values.
The game starts by shuffling all cards and distributing them in
$N$ sequences, not
necessari... | 29,131 |
Passing Secrets
Description:
In the public school system, passing secret messages between
students is a serious enterprise with a proud, noble history.
At the Junior Computer Scientist High School, industrious
students have discovered the idea of peer-to-peer networking
and have adapted this to message... | 29,132 |
Passport Stamps
Description:
You just got your new passport, fresh with pages ready to be
stamped by immigration officers. Sadly, because your passport
has so many pages, immigration officers are too lazy to try to
use your pages efficiently, so you may need to get a new
passport sooner than you think.... | 29,133 |
Password Hacking
Description:
You have done a lot of hacking using such lists, and you
have a good idea of how likely each password in the list is the
correct one (you are very surprised by the number of people
using “123456” as their passwords). You have a new account to
hack, and you have decided to ... | 29,134 |
Password Rotation
Description:
Yraglac recently found a list of compromised passwords for a
major online website and would like to analyze the data to find
out if any two users have similar passwords. Two passwords are
considered similar if they are rotations or reverse rotations
of each other. The rot... | 29,135 |
Passwords
Description:
It’s that time of the year again when you go back to work
and need to choose new passwords for all your services. The
rules enforced by the system administrators are very strict,
and the password you choose must obey the following
restrictions:
* It must contain only letters and... | 29,136 |
Patchwork
Description:
Adam’s grandmother has a birthday coming up and he wants to
make her a beautiful patchwork quilt as a present. He has
created a collection of patch designs that he will sew onto the
quilt. However, he is having trouble deciding exactly where to
place his patches. His current proc... | 29,137 |
Path Crossings
Description:
Yraglac is the developer of a popular Android/iOS racing
game that also happens to collect location data from its
players all the time, even when the player is not using the
app. He has now amassed a large database of the precise
location $(x,y)$ of
players over time $(t... | 29,138 |
Path Tracing
Description:
Billy likes to wander around. Each day he follows a sequence
of up, down, left and right moves. At the end of the day, he
would like to know where he’s been. You are going to help by
providing Billy with a program that draws a map for him. The
program should read a sequence of... | 29,139 |
Paths
Description:
A graph is a mathematical structure which consists
of a set of vertices, and a set of edges,
each connecting two vertices. An example of a graph with
$4$ vertices and
$3$ edges is shown in the
sample explanation below.
A path in the graph is defined as an ordered list
of $2$... | 29,140 |
Patrick's Triangle
Description:
Patrick is an unknown mathematician that wanted to become
famous. Patrick had heard that the mathematician Blaise Pascal
had became famous because of his triangle, Pascal’s
triangle.
1
1
1
1
2
1
1
3
3
1
1
4
6
4
1
Patrick thought that if he could come up with ... | 29,141 |
Patuljci
Description:
Every day, while the dwarves are busy in the mines, Snow
White prepares dinner for them; seven chairs, seven plates,
seven forks and seven knives for seven hungry dwarves.
One day nine dwarves came from the mines instead of seven
(nobody knows how or why), each of them claiming to be... | 29,142 |
Patuljci
Description:
Snow White and the $N$
dwarfs live in the forest. While the dwarfs mine away Snow
White hangs around social networks.
Each morning the dwarfs form a long line and go whistling
away to the mine. Snow White runs around them and snaps
pictures to upload onto her favorite social netw... | 29,143 |
Paul Eigon
Description:
Paul Eigon recently got a new job at a famous company in
town. They have all sorts of cool stuff at the office. Video
games, a swimming pool, a sauna, and even a ping-pong table!
Paul really loves his enjoyable new workplace.
Mr. Eigon plays a lot of ping-pong at work. While he is
... | 29,144 |
Pavers
Description:
In the land of Quendor, walkways, sidewalks and
hallways are always $2$
mb (mini-bloit, roughly $\frac{1}{2000}$ of a bloit)
in width. J. Pierpont Flathead (pictured to the right) has
hired the Frobozz Magic Paver Company to install new
walkways in and around all his banks using pav... | 29,145 |
Pawn Shop
Description:
You run a tight ship at the pawn shop. You arrange certain
items in the window to be displayed to the street. You
sometimes display the same type of item multiple times. For
simplicity, we think of the items on display as a sequence of
values where the value represents the type o... | 29,146 |
Pea Pattern
Description:
Do you see the pattern in the following sequence of
numbers?
Each term describes the makeup of the previous term in the
list. For example, the term $3112$ indicates that the previous
term consisted of three $1$’s (that’s the $31$ in $3112$) and one $2$ (that’s the $12$ in $3112$).... | 29,147 |
Pea Soup and Pancakes
Description:
## Input
The first line of input contains a number $n$ ($1
\le n \le 10$), the number of restaurants. Then follow
the $n$ restaurant menus.
Each menu starts with a line containing a number $k$ ($1
\le k \le 10$), the number of menu items for the day.
The remainde... | 29,148 |
Peach Powder Polygon
Description:
After rescuing Prince Mario, Peach finds herself trapped in
a polygonal world consisting of many castles. She knows that
even though she defeated Bowser, Bowser’s unknown cousin Powder
is coming after her. Peach runs from castle $1$ to castle $2$ as fast as she can, and as... | 29,149 |
Peak Tower
Description:
After taking the Peak Tram, you reach the Peak
Tower — an ideal place to take a picture of the Victoria
Harbour.
Being a must-see attraction, the Peak Tower is packed with
tourists, and it’s pretty hard to take a picture without many
people blocking the beautiful scene. Occasio... | 29,150 |
Peak Tram
Description:
Inspired by the Peak Tram in Hong Kong, you are going to
build your own peak tram on a hill, together with the buildings
near it. The peak tram and the buildings are aligned on a
straight line. The peak tram is at position $0$ on the line. There are
$n$ buildings, where
build... | 29,151 |
Pear-wise Voting
Description:
Bob Roberts is ending his term as president of a local group
of fruit aficionados call the Pear-wise Club. Being president
is a plum position so many people are running, some of whom Bob
thinks are just peachy, while others are just the pits. After
some thought, Bob has am... | 29,152 |
Pearls
Description:
Nikoli’s Jewelry Store in Puzzletown sells a line of
necklaces consisting of black and white pearls. The pearls in
the necklace are firmly glued to a cord of length $k$, where each unit of cord length
either holds a pearl or is empty. Each necklace is displayed on
a rectangular velv... | 29,153 |
Pearls
Description:
Laura likes to create pretty necklaces with pearls. She has
two neckalces $A$ and
$B$, which she would like
to use as templates to create a new necklace. A necklace is
represented by a string, where each character represents the
color of a bead on the necklace.
Laura furthermor... | 29,154 |
Pebble Solitaire
Description:
I bet you have seen a pebble solitaire game. You know the
game where you are given a board with an arrangment of small
cavities, initially all but one occupied by a pebble each. The
aim of the game is to remove as many pebbles as possible from
the board. Pebbles disappear ... | 29,155 |
Pebble Solitaire
Description:
I bet you have seen a pebble solitaire game. You know the
game where you are given a board with an arrangment of small
cavities, initially all but one occupied by a pebble each. The
aim of the game is to remove as many pebbles as possible from
the board. Pebbles disappear ... | 29,156 |
Peculiar primes
Description:
The level of corruption in some countries is really high. It
is hard to imagine that these unethical manners have already
hit the academic field. Some rumors are spreading that some
students tried to bribe their lecturers to get better grades.
Would you believe it?
But the... | 29,157 |
Pedal Power
Description:
You’re ready to start your semester off right! Well,
almost … you have everything listed on your calendar, you
just bought a brand new bike, but you haven’t yet planned your
commute! You are quite busy this semester, and so you decide to
plan a route for all your classes and ap... | 29,158 |
Peer Streaming
Description:
It is now time to develop the logic to decide which users
should send which data to which other users. At a high level,
the logic works as follows. Each second, the data available at
the different users listening to a song is examined. Based on
this, the system decides what ... | 29,159 |
Peg
Description:
In the famous logic game Peg, pieces jump over other pieces
to remove them from the game, until only one piece is left.
Here is the initial layout of the board:
```
ooo
ooo
ooooooo
ooo.ooo
ooooooo
ooo
ooo
```
The lowercase letter ’o’
represents a piece, while the character ’.’ i... | 29,160 |
Peg Game for Two
Description:
Jacquez and Alia’s parents take them on many road trips. To
keep themselves occupied, they play a triangular peg game,
meant for one player. In the original game, one player has an
equilateral triangle containing $15$ holes (five holes per side of the
triangle). Initially ... | 29,161 |
Peg Solitaire
Description:
The game of peg solitaire, popular at the court of the
French king Louis XIV, has the following rules. Given a
two-dimensional board with a mesh of holes, each hole can
contain one peg (pin). The only legal move of a peg is a
vertical or horizontal jump over an adjacent peg i... | 29,162 |
Pegs
Description:
Little Zorro and Worro are playing an interesting game on an
$n\times n$ square grid.
Each game is really short: each player makes just one move. The
game is played with very very thin pegs. The pegs come in two
colors: black and white. Zorro goes first: he puts the pegs at
the ve... | 29,163 |
Pegs and Legs
Description:
Pegs and Legs is a game where a disk slides down a
nearly-vertical board. At the bottom of the board are places
for the disk to land, called legs. Each
leg is worth a certain amount of points if your disk lands in
it.
You start with a disk at the top and drop it onto some
... | 29,164 |
Pencil Crayons
Description:
Mr. Daniels bought a set of $N$ identical boxes of pencil crayons
for his classroom, each containing the same set of $K$ distinct colours of pencils. Over
the course of the year, the pencil crayons got mixed up between
the boxes. Surprisingly, none of them have been lost (yet). ... | 29,165 |
Peningar
Description:
Tómas has found himself in a strange world. This world
consists of $n$ cells
arranged in a circle. Thus cells $i$ and $i+1$ are adjacent for $1 \leq i < n$, and cells
$1$ and $N$ are also adjacent. In each cell
there is an $a_ i$ amount
of money. Tómas starts at cell $1$. In e... | 29,166 |
Peragrams
Description:
Per recently learned about palindromes. Now he
wants to tell us about it and also has more awesome scientific
news to share with us.
“A palindrome is a word that is the same no matter whether
you read it backward or forward”, Per recently said in an
interview. He continued: “For... | 29,167 |
Perfect Date
Description:
Hori-san and Miyamura-kun are high-school lovers with a
special kind of chemistry any modern day couple would dream
for. Their ability to understand each other on a deeper level
better than anyone else is something only they can understand.
Just like any blossoming youthful co... | 29,168 |
Perfect Path Patrol
Description:
Citizens have formed a community watch program to ensure the
streets are safe to walk at night. So, some citizens patrol
certain regions of the neighborhood. These patrols are also
simple: a single citizen simply patrols all streets lying on
the unique path between two ... | 29,169 |
Perfect Porridge
Description:
As a true student Lucky Luke eats a big bowl of perfect
porridge each morning. Luke’s goal in life is to get every
chalmerist to love porridge.
In the faculty there are $N$ yet-to-be-enlightened students.
Luke is unfortunately not necessarily able to serve perfect
porridg... | 29,170 |
Perfect Pth Powers
Description:
We say that $x$ is a
perfect square if, for some integer $b$, $x
= b^{2}$. Similarly, $x$ is a perfect cube if, for some
integer $b$, $x = b^{3}$. More generally,
$x$ is a perfect
$p$th power if, for some
integer $b$, $x = b^{p}$. Given an integer
$x$ you are... | 29,171 |
Perfect Skyline
Description:
Zara, an aspiring architect and urban planner, has drawn out
what she considers to be the perfect skyline. As Zara is still
aspiring she must use her young daughter, Pippa, to test out
her designs. In order to test out the designs Pippa must build
them out of her building b... | 29,172 |
Perfect Squares
Description:
A famous theorem in number theory states that every positive
integer can be written as the sum of four perfect squares. You
have noticed, though, that usually fewer squares are enough.
For example, $27$ only
requires three perfect squares: $27 = 5^2 + 1^2 + 1^2$.
You share... | 29,173 |
Perfect k-ary Tree
Description:
A graph $G$ is given,
which is a tree with $N$
nodes. The nodes are labelled $1,
2, \dots , N$. Count the number of subgraphs of
$G$ which is a perfect
$k$-ary tree. An unrooted
tree is called a perfect $k$-ary tree if it is possible to root
the tree such tha... | 29,174 |
Performance Review
Description:
Employee performance reviews are a necessary evil in any
company. In a performance review, employees give written
feedback about each other on the work done recently. This
feedback is passed up to their managers which then decide
promotions based on the feedback received... | 29,175 |
Perica
Description:
—“I’m stopping by Žnidaršić’s house, you play the piano,
Perica.”
—“Ok, dad, I will!”
And so, Perica began playing the piano. His piano consists
of $N$ keys. Each key has
a value written on it, $a_
i$. When Perica plays the piano, he presses exactly
$K$ different keys at th... | 29,176 |
Periodic Points
Description:
Computing the number of fixed points and, more generally,
the number of periodic orbits within a dynamical system is a
question attracting interest from different fields of research.
However, dynamics may turn out to be very complicated to
describe, even in seemingly simple... | 29,177 |
Periodic Strings
Description:
Define a $k$-periodic string as
follows:
A string $s$ is
$k$-periodic if the length of the
string $|s|$ is a multiple
of $k$, and if you chop
the string up into $|s|/k$
substrings of length $k$,
then each of those substrings (except the first) is the same as
... | 29,178 |
Periodni
Description:
Luka is bored in chemistry class so he is staring at a large
periodic table of chemical elements hanging from a wall above
the blackboard. To kill time, Luka decided to make his own
table completely different from the one in the classroom.
His table consists of $N$ columns, each with... | 29,179 |
Perket
Description:
"Perket" is a widely known and delicious meal. For perket to
be what it is, cooks must carefully choose the ingredients to
get the fullest taste possible while keeping the meal
traditional.
You have $N$
ingredients at your disposal. For each we know its sourness
$S$ and bittern... | 29,180 |
PermRLE
Description:
You’ve invented a slight modification of the run-length
encoding (RLE) compression algorithm, called PermRLE.
To compress a string, this algorithm chooses some
permutation of integers between 1 and $k$, applies this permutation to the
first $k$ letters of the
given string, then to... | 29,181 |
Permutation Arrays
Description:
Lord Pooty loves permutations. However, what’s more
interesting than permutations are arrays of permutations. He
has $X$, a hidden array of
$m$ permutations, each of
length $n$. He also has
$k$ constraints regarding
$X$ that will be
elaborated below.
A permu... | 29,182 |
Permutation CFG
Description:
Consider a permutation of the integers $1$ to $n$. Now, consider each number
$1$ through $n$ to be a non-terminal in a
Context-Free Grammar (CFG). Each number $k$ expands a list of the integers
from $1$ to $k$ in the order of the permutation.
For example, if $n=4$ and
t... | 29,183 |
Permutation Code
Description:
As the owner of a computer forensics company, you have just
been given the following note by a new client:
I, Albert Charles Montgomery, have just discovered the
most amazing cypher for encrypting messages. Let me tell you
about it.
To begin, you will need to decide on a... | 29,184 |
Permutation Descent Counts
Description:
Given a positive integer, $N$, a permutation of order
$N$ is a one-to-one (and
thus onto) function from the set of integers from $1$ to $N$ to itself. If $p$ is such a function, we represent
the function by a list of its values:
For example, $[5 \, 6 \, 2 \,
4 \... | 29,185 |
Permutation Encryption
Description:
Working for the Texas Spy Agency, you are in charge of
writing software for handling secure communications between
your clients who wish to pass you messages without anyone else
being able to read them. Therefore, you have been commissioned
to write a program which t... | 29,186 |
Permuted Arithmetic Sequence
Description:
An arithmetic sequence is a list of values where the
difference between consecutive values is always the same. For
example, $3, 7, 11, 15$
qualifies and so does $25, 15, 5,
-5, -15$. However $2, 4,
7$ and $3, 6, 9, 6$
are not arithmetic sequences.
## I... | 29,187 |
Persistent Numbers
Description:
The multiplicative persistence of a number is defined by
Neil Sloane (Neil J.A. Sloane in The Persistence of a
Number published in Journal of Recreational Mathematics 6,
1973, pp. 97-98., 1973) as the number of steps to reach a
one-digit number when repeatedly multiplyin... | 29,188 |
Pervasive Heart Monitor
Description:
You have been hired by a fitness center. You are helping to
develop a system to monitor customer heart rate during
exercise. While the customer stays in the gym, their heart rate
is recorded at 10-minute intervals. When they leave, they can
get a report of their ave... | 29,189 |
Pesky Heroes
Description:
“But, milord, then surely they will be doomed when the traps
have been re-activated,” were the last words of a servant,
uttered milliseconds before he…well, you get the picture. “Not
necessarily, I may have to teleport my trained orcs to seal
their fate. You there, figure out ... | 29,190 |
Pesky Mosquitoes
Description:
Mosquitoes are relentless this time of year! They have
absolutely ruined your attempt at a picnic and it is time to
take your revenge. Unfortunately, you are not well equipped to
ward off these pests. All you have got at your disposal is an
empty bowl that previously held ... | 29,191 |
Pet
Description:
In the popular show “Dinner for Five”, five contestants
compete in preparing culinary delights. Every evening one of
them makes dinner and each of other four then grades it on a
scale from 1 to 5. The number of points a contestant gets is
equal to the sum of grades they got. The winner... | 29,192 |
Pharmacy
Description:
Many pharmacies in the United States fill prescriptions
strictly on a first-come, first-served basis, even preferring
prescriptions submitted electronically from a remote site to
prescriptions dropped off by waiting customers in the store.
This frequently leads to situations where... | 29,193 |
Phone List
Description:
Given a list of phone numbers, determine if it is consistent
in the sense that no number is the prefix of another. Let’s say
the phone catalogue listed these numbers:
* Emergency 911
* Alice 97 625 999
* Bob 91 12 54 26
Emergency 911
Alice 97 625 999
Bob 91 12 54 26
In this case,... | 29,194 |
Physical Music
Description:
The music business is changing rapidly, and this is
reflected by the single charts. Initially, the Dutch Single Top
100 was based purely on sale numbers of CD singles. In the
course of time, however, these numbers dropped dramatically, in
favour of legal and illegal download... | 29,195 |
Physiognomy
Description:
A properly designed room is, as we all know, well-lit.
In keeping with the teachings of Feng Shui, you
have placed a number of lamps around a newly-designed room at
strategic places to give it a friendlier air.
Some of the lights project positive energy, and the
rest give out onl... | 29,196 |
Pianino
Description:
Young Mirka is an amateur musician. She plays the
multi-piano. $A$
multi-piano consists of an infinite number of multi-keys,
denoted with integers that can be interpreted as the pitch.
$A$ multi-composition (a
composition written for a multi-piano) can be represented with
a... | 29,197 |
Pianissimo
Description:
Composers use dynamics in sheet music to indicate how loud
or soft the notes shall be played. Consider an $8$-scale dynamic system:
* ppp: pianississimo (the softest)
* pp: pianissimo (very soft)
* p: piano (soft)
* mp: mezzopiano (moderately soft)
* mf: mezzoforte (moderately loud)
*... | 29,198 |
Piano Lessons
Description:
Given Mrs. Mackenzie’s time slots, and a list of the
time slots that work for each potential student, can you help
her determine the maximum number of students she can fit into
her schedule? Note that Mrs. Mackenzie only teaches
private lessons (one student at a time) and no ... | 29,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.