task stringlengths 0 154k | __index_level_0__ int64 0 39.2k |
|---|---|
Power Eggs
Description:
Benedict bought $K$
identical power eggs from Dropeggs.com, and now he wants to
test them by dropping them from different floors of his
building. His building has $N$ floors numbered $1$ to $N$. $F$ is an unknown number in the range
from $0$ to $N$, inclusive. Each egg will brea... | 29,300 |
Power Grid
Description:
A city consists of a rectangular $N \times M$ grid of blocks. Each
block $(i, j)$ has some
unknown power consumption $A_{i,
j}$. Some of the city blocks house power stations, while
some might have no buildings in them at all, so it’s possible
that $A_{i, j}$ is
positive,... | 29,301 |
Power Signs
Description:
You are probably familiar with the binary representation of
integers, i.e. writing a nonnegative integer $n$ as $\sum _{i=0}^ k a_ i \cdot 2^ i$,
where each $a_ i$ is
either $0$ or $1$. In this problem, we consider a so
called signed binary representation, in which we still
... | 29,302 |
Power String Matching
Description:
For two strings $s_1$
and $s_2$, let
$s_1 + s_2$ denote their
concatenation, e.g. abc + cda is the string abccda.
Now for a string $s$
and an integer $k \geq 0$
we let $s^ k$ denote the
result of concatenating $k$ copies of $s$, i.e. $\texttt{ab}^3 = \texttt{... | 29,303 |
Power Strings
Description:
Given two strings $a$
and $b$ we define
$a\cdot b$ to be their
concatenation. For example, if $a
= \text {"abc"}$ and $b =
\text {"def"}$ then $a\cdot b = \text {"abcdef"}$. If we
think of concatenation as multiplication, exponentiation by a
non-negative integer i... | 29,304 |
Power of Divisors
Description:
Consider a positive integer $n$. Let $f(n)$ be the number of positive
integer divisors of $n$.
For example, if $n=8$ then
$f(n)=4$, since the
divisors of $8$ are
$1$, $2$, $4$ and $8$.
Now, consider a positive integer $x$. What is the smallest value of
$n$ such t... | 29,305 |
Powers and Modulus
Description:
One day you and GTmac walk into a classroom and see a
mysterious expression on the blackboard:
Upon seeing the expression GTmac shows an evil smile and
challenges you: “Let me give you the values of $a$ and $b$ and let’s assume $b$ is an odd number. Want to bet who
can eval... | 29,306 |
Powers of 2
Description:
Theta has been learning about powers of $2$ in school. She notices that some
numbers when written out contain powers of $2$ in their digit representation: for
instance, $12\, 560$
contains $256$ which is a
power of $2$. She has been
wondering how many such numbers there are... | 29,307 |
Powers of 2 (Easy)
Description:
Theta has been learning about powers of $2$ in school. She notices that some
numbers when written out contain powers of $2$ in their digit representation: for
instance, $12\, 560$
contains $256$ which is a
power of $2$. She has been
wondering how many such numbers th... | 29,308 |
Pravokutni
Description:
$N$ points are placed
in the coordinate plane.
Write a program which calculates in how many ways a right
triangle can be formed by three of the given points. A right
triangle is one in which one of the angles is $90$ degrees.
## Input
The first line of input contains an integer $... | 29,309 |
Precarious Stacks
Description:
It’s been difficult finding a job in the tech industry
lately. You managed to land a job working for a construction
company, but some of the tasks being assigned to you have you
wondering whether the engineers have ever heard of gravity.
Anyway, in the latest task, you ar... | 29,310 |
Predicting GME
Description:
GME is the stock market ticker symbol for Gamestop, which is
famously known around the world today for its short squeeze
phenomenon. This incident caused major financial consequences
for rich hedge funds, and brought money to many young, naive
investors.
Sarah recently beca... | 29,311 |
Prefix Free Code
Description:
Consider $n$ initial
strings of lower case letters, where no initial string is a
prefix of any other initial string. Now, consider choosing
$k$ of the strings (no
string more than once), and concatenating them together. You
can make this many such composite strings:
C... | 29,312 |
Prehistoric Programs
Description:
Taken together, the tablets appear to describe a great piece
of work – perhaps a program, or an epic, or even tax records!
Unsurprisingly, after such a long time, the tablets are in a
state of disorder. Your job is to arrange them into a sequence
so that the resulting ... | 29,313 |
Preludes
Description:
Frederic Chopin was a Polish music composer who lived from
1810–1849. One of his most famous works was his set of
preludes. These $24$
pieces span the $24$
musical keys (there are musically distinct $12$ scale notes, and each may use
major or minor tonality). The $12$ distinct... | 29,314 |
Prerequisites?
Description:
Freddie the frosh has chosen to take $k$ courses. To meet the degree
requirements, he must take courses from each of several
categories. Can you assure Freddie that he will graduate, based
on his course selection?
## Input
Input consists of several test cases, at most $50$. Fo... | 29,315 |
Presidential Elections
Description:
In a few weeks time, a new president will be elected in the
country of Marecia. There are two political parties: the
Constituents and the Federals. Each party has one presidential
candidate; one of these will become the new president.
This year you are more involved tha... | 29,316 |
Pretty Good Cube Root
Description:
Given a positive integer $x$, the cube root of $x$ may or may not be an integer.
We’ll define an approximate cube root of $x$ as the positive integer
$y$ such that $y^3$ is as close is possible to
$x$.
## Input
Input has up to $100$
lines with one positive integer p... | 29,317 |
Primal Partitions
Description:
The Math department has challenged the Computer Science
department at your University to solve a difficult puzzle in
Discrete Mathematics. With the pride of your Computer Science
department at stake, you must solve this puzzle!
In this puzzle, you are given a sequence of $n$... | 29,318 |
Primal Representation
Description:
The fundamental theorem of arithmetic says that every
integer can be represented as a unique product of prime
numbers. For example, consider the number $319\, 176$. It can be written as the
product $31 \times 3 \times 3
\times 2 \times 2 \times 2 \times 13 \times 11$,... | 29,319 |
Primality
Description:
Given a positive integer $N$, determine whether it is prime or
not.
## Input
The first line contains the integer $N$ ($2
\le N \le 10^{18}$).
## Output
Output YES if $N$ is prime, and NO otherwise.
## Scoring
Your solution will be tested on a set of test groups, each
worth a nu... | 29,320 |
Primary Arithmetic
Description:
Children are taught to add multi-digit numbers from
right-to-left one digit at a time. Many find the “carry”
operation – in which a $1$
is carried from one digit position to be added to the next – to
be a significant challenge. Your job is to count the number of
carr... | 29,321 |
Primary Register
Description:
The only operation available is an “increment” operation.
When it is performed, the size $2$ register is increased by
$1$. If this increment
causes overflow (i.e., if the old value was $1$) the value is reset to
$0$, and the size
$3$ is incremented. If
this causes ... | 29,322 |
Primary X-Subfactor Series
Description:
Let $n$ be any positive
integer. A factor of $n$ is any number that divides evenly
into $n$, without leaving
a remainder. For example, $13$ is a factor of $52$, since $52/13 = 4$. A subsequence of
$n$ is a number without a
leading zero that can be obtained fr... | 29,323 |
Prime Bitcount
Description:
This problem is very easy to describe. In fact, it is so
easy to describe that there is really no need for a preamble
such as the one you are reading right now, which makes it
surprising that the problem author didn’t just omit this part
and skip directly to the Input and Ou... | 29,324 |
Prime Count
Description:
Given a positive integer $N$, compute the number of primes less
than $N$.
## Input
The first line contains the integer $N$ ($1
\le N \le 10^{11}$).
## Output
Print the number of primes less than or equal to
$N$.
## Scoring
Your solution will be tested on a set of test groups,... | 29,325 |
Prime Matrix
Description:
A Prime Matrix is defined as an
$n \times n$ square matrix
satisfying:
* All numbers in the matrix are positive integers, and
* The numbers in each row are distinct, and
* The numbers in each column are distinct, and
* The sum of numbers in each row is a prime number,
and
... | 29,326 |
Prime Path
Description:
Now, the minister of finance, who had been eavesdropping,
intervened.
— No unnecessary expenditure, please! I happen to know that the
price of a digit is one pound.
— Hmm, in that case I need a computer program to minimize the
cost. You don’t know some very cheap software gu... | 29,327 |
Prime Reduction
Description:
A prime number $p \geq
2$ is an integer which is evenly divisible by only two
integers: 1 and $p$. A
composite integer is one which is not prime. The fundamental
theorem of arithmetic says that any integer $x$ can be expressed uniquely as a set
of prime factors – those ... | 29,328 |
Prime Sieve
Description:
## Input
The first line of input consists of two integers
$n$, $q$, where $1 \leq n \leq 10^8$ and $1 \leq q \leq 20000$. Then follow
$q$ lines, each containing
an integer $x$ satisfying
$1 \leq x \leq n$.
## Output
On the first line of output, write one line giving the
... | 29,329 |
Prime Spiral
Description:
Boredom can be good for creativity. Polish mathematician
Stanislaw Ulam (1909-1984) discovered the eponymous Ulam spiral
while listening to a “long and very boring paper”. He started
by writing down the positive integers in a spiral on a grid,
one number per grid cell. Then he... | 29,330 |
Prime Time
Description:
Odd and Even have had their share of fun times playing the
good old prime game:
They start with an arbitrary natural number, and take turns
either adding $1$ or
dividing by a prime (assuming the result is still a natural
number), and the one to reach $1$ is the winner. However,... | 29,331 |
Primitive Roots
Description:
Primitive roots modulo $m$ are values $g$ such that $g^{\phi (m)} = 1 \pmod{m}$ but
$g^k \neq 1 \pmod{m}$ for
all $k < \phi (m)$.
Such values only exist if $m =
1, 2, 4, p^k$ or $2p^k$ where $p$ is an odd prime and $k \geq 1$.
Find such a value $g$
for $m$ or report that ... | 29,332 |
Primonimo
Description:
Primonimo is a game played on an $n \times m$ board filled with numbers
taken from the range $1 \ldots
p$ for some prime number $p$. At each move, a player selects a
square and adds $1$ to the
numbers in all squares in the same row and column as the
selected square. If a squa... | 29,333 |
Prince and Princess
Description:
On an $n \times n$
chessboard, the Prince and the Princess play a game. The
squares on the chessboard are numbered $1, 2, 3, \ldots , n^2$, as shown in
Figure 1:
The Prince stands in square $1$, makes $p$ jumps and finally reaches square
$n^2$. He enters a square
a... | 29,334 |
Princeza
Description:
Luka parked his truck near the lake. The lake is inhabited
by the frog Barica, who jumps acrossplants floating on the
lake’s surface. Knowing a fair number of folk tales, Luka knows
that if he kisses Barica, she will turn into a beautiful
princess. However, he needs to catch her f... | 29,335 |
Prinova
Description:
Brojko and Brojana are happily married with $N$ little boys. The boys are named
with distinct even integers $P_1,
P_2, \ldots , P_ N$.
Brojko and Brojana are expecting an addition to their family
and have to come up with a nice name for the little girl. They
have decided that the ... | 29,336 |
PrintQuoter3D
Description:
With the commoditization of 3D printing, Mat Hedicine
decided to try his hand at starting his own 3D printing
business. He knows there is a lot of competition in this space
and he needs a way to distinguish himself. Knowing that few
people are good at CAD, he thought, what if... | 29,337 |
Printer Scheduling
Description:
There are $n$ files to
be printed using $m$
identical printers. The files are numbered from $1$ to $n$. The printers are numbered from
$1$ to $m$. Assuming each page takes one unit
of time to print, for each file $i$, we have the following
information:
* The number ... | 29,338 |
Printing Costs
Description:
Your workplace is starting to become concerned with the cost
of toner used for printing. Of course, some pages are more
expensive to print than others. Your job is to write a program
that helps to figure out how much toner it will take.
Each character requires a different amoun... | 29,339 |
Pripreme
Description:
Ante and Goran are preparing $N$ teams of young ambitious students
for a student programming competition of students from
University of Zagreb. Both of them have one algorithm they
have to explain to each team. Of course, both can’t
work with the same team at the same time and non... | 29,340 |
Prison Rearrangement
Description:
In order to lower the risk of riots and escape attempts, the
boards of two nearby prisons of equal prisoner capacity, have
decided to rearrange their prisoners among themselves. They
want to exchange half of the prisoners of one prison, for half
of the prisoners of the... | 29,341 |
Private Space
Description:
People are going to the movies in groups (or alone), but
normally only care to socialize within that group. Being
Scandinavian, each group of people would like to sit at least
one space apart from any other group of people to ensure their
privacy, unless of course they sit at... | 29,342 |
Prjónamynstur
Description:
Heiðrún thoroughly enjoys knitting all sorts of garments for
her family members. Whenever a new baby arrives in the family,
one can expect that a dress, hat or sweater is her next
project.
When Heiðrún knits, she often makes use of recipes, also
known as knitting patterns, w... | 29,343 |
Probe Droids
Description:
After being stationed on Hoth, you’ve decided that this is
the worst decision you have ever made. The planet is cold,
there is nothing to do, and to make matters worse, the Empire
keeps sending probe droids down to see if anyone is hiding on
the planet. At least you can do som... | 29,344 |
Problem Classification
Description:
When reading programming problems, one can often get some
hints regarding the topic of the problem by skimming the
problem statement for certain words. If, for example, the word
“vertex” or “edge” appears, the problem is almost certainly a
graph problem, while the wo... | 29,345 |
Problem Set Construction
Description:
You are a judge, constructing a problem set for a contest.
You have a pool of candidate problems. For each problem, you’ve
found the probability that a team is able to solve the problem,
and the time it will take them to implement the solution if
they are able to s... | 29,346 |
Problematic Polygons
Description:
You are an employee at the Polygon Packing Plant, where your
job is to pack objects with simple polygon shapes into
containers with simple polygon shapes. However, the object and
containers are often misaligned, so the object may need to be
rotated before it can fit in... | 29,347 |
Product Digit
Description:
Nikolaj works at a company that sells a large number of
products. Each product has a product ID, which is a large
integer. For error detection, in particular in connection with
manual database entry, it would be useful if each product also
had a single “check” digit between $... | 29,348 |
Product Divisors
Description:
Given a sequence of integers $a_1, a_2, \dots a_ n$, compute the
number of divisors of their product $A = \prod _{i=1}^ n a_ i$.
## Input
The first line contains the number of integers in the
sequence $n$ ($1 \le n \le 10^6$).
The second line contains the $n$ space-separated in... | 29,349 |
Prof. Fumblemore and the Collatz Conjecture
Description:
The Collatz function,
C(n), on positive integers is:
The Collatz sequence,
CS(n), of a positive integer, n, is the
sequence
For example, CS(12) = 12, 6, 3, 10, 5, 16, 8, 4, 2, 1, 4, 2,
1, …
The Collatz Conjecture
(also known as the 3n+1 pr... | 29,350 |
Profitable Pizzas
Description:
A new app available in Calgary allows people to sign-up to
deliver pizzas in exchange for money. Every first of the month,
a new list of pizzas to deliver is available. Each entry on the
list contains the amount of money the delivery-person will earn
to deliver the pizza,... | 29,351 |
Profitable Trip
Description:
You are planning a road trip. You have carefully mapped out
all potential waypoints that you may stop at. From each
waypoint, there are roads that allow you to drive to other
waypoints, but roads can only be used in one direction. In
order to alleviate traffic jams, the roa... | 29,352 |
Program
Description:
Mirko is trying to debug a piece of his code. First he
creates an array of $N$
integers and fills it with zeros. Then he repeatedly calls the
following C++ procedure:
```
void something( int jump ) {
int i = 0;
while( i < N ) {
seq[i] = seq[i] + 1;
i = i + jump;
}
}
```
... | 29,353 |
Programmeringsolympiaden's Budget
Description:
Programmeringsolympiaden (PO) must write a budget every
year, which then needs to be approved by the treasurer Emil.
This year, the PO leadership has proposed some rather wild
ideas, such as buying 2000 ducks and purchasing a PO-yacht to
sail to the IOI (t... | 29,354 |
Programming Team
Description:
UpCoder is looking to assign their best employees to a team
tasked with designing their new and improved website, and
they’re looking to you to help them form the team. There are
$n$ potential candidates.
The CEO is employee number $0$, and the candidates are all
assig... | 29,355 |
Programming Team Selection
Description:
You are a coach for a competitive learning program. It’s
time for the regional competition and you have to group your
students into teams. Every team needs exactly three members and
every student needs to be on a team.
While choosing your teams, you must keep in min... | 29,356 |
Programming Tutors
Description:
You are the founder of the Bruce Arden Programming
Collective, which is a tutoring programme that matches
experienced programmers with newbies to teach them. You have
$N$ students and
$N$ tutors, but now you
have to match them up. Since the students will have to trav... | 29,357 |
Progressive Scramble
Description:
You are a member of a naive spy agency. For secure
communication, members of the agency use a very simple
encryption algorithm – which changes each symbol in the message
‘progressively’, i.e., based on the symbols preceding it. The
allowed symbols are space and the $26... | 29,358 |
Prokletnik
Description:
Young Luka is about to enter a house with the evil witch
Marica inside. As soon as he enters the house, she asks him
questions about her array of $N$ numbers. Luka fearfully asks for a
clarification of the questions. Marica explains to him that
each query consists of two integer... | 29,359 |
Prolonged Password
Description:
Kang the Penguin has forgotten some letters of his password,
help him figure them out!
Of course, Kang knows that something as important as a
password should be easy to remember, but it also cannot be too
short. Thus, he knows that he originally decided to generate
his ... | 29,360 |
Promotions
Description:
The Fair Inc. administration decided to promote the
best employees and limited the number of promotions to a fixed
interval $[A,B]$. The
directors compared the employees’ performance and their
evaluations resulted in a consistent precedence relation among
employees, which ha... | 29,361 |
Proofs
Description:
You are teaching discrete math. You have done your best to
teach your students about axioms and inference rules, proofs
and theorems. Sometimes the students write beautiful proofs
that Fermat would be proud of but sometimes, also like Fermat,
their proofs are not quite right. You ar... | 29,362 |
Prosjek
Description:
Slavko decided to challenge Mirko! He gave him a real number
$P$ and a bag full of
pieces of paper with exactly one number between $1$ and $5$ inclusive written on each paper.
There is an unlimited quantity of each type of paper.
Mirko’s task is to pick the minimum number of papers in... | 29,363 |
Prosjek
Description:
You are given an array of $N$ integers. Find a consecutive
subsequence of numbers of the length at least $K$ that has the maximal possible
average.
## Input
The first line of input contains two integers $N$ ($1
\leq N \leq 3 \cdot 10^5$) and $K$ ($1
\leq K \leq N$). The second li... | 29,364 |
Prospecting
Description:
Prospectin’ Pete has a lead on a new titanium mine, and
needs your help pitching a mining operation to investors. The
mine can be represented as a tree: the mine entrance is the
root of the tree, other tree nodes are pockets of underground
titanium ore, and the tree edges are p... | 29,365 |
Prosti
Description:
Mirko and his older brother Slavko are playing a game. At
the beginning of the game, they pick three numbers $K$, $L$, $M$. In the first and only step of the
game, each of them picks their own $K$ consecutive integers.
Slavko always picks the first $K$ integers (numbers $1, 2, \ldots , K$)... | 29,366 |
Protect the Pollen!
Description:
The Flariana flowers and the bumblebees form one of the
nicest partnerships in the rainforest. In spring, several
flowers bloom and start producing pollen. Special vines form a
network of bridges between the flowers. Using the vines, there
is exactly one way to get from... | 29,367 |
Protecting the Collection
Description:
Nathaniel collects rare gems and minerals, and has decided
he has to protect his valuable collection from thieves. He is
installing an electric eye system, in which he shines a laser
into the room with his collection, and the laser will hit a
sensor as long as no ... | 29,368 |
Protein Synthesis
Description:
Latbo is well known to be the laziest city in Sweden. Björn
has had the goal of being the laziest in town since he was
little. Yesterday, he made it all the way to the final in this
year’s laziness competition. He was fully prepared to win but
was completely crushed when ... | 29,369 |
Proteins
Description:
Magnus is a biologist. He is playing with proteins all day
long and now he wants to know what these molecules look like.
He has heard that X-ray crystallography can be used to get
images of proteins that contain a lot of sulfur atoms. Magnus
does not think his proteins contain eno... | 29,370 |
Provinces and Gold
Description:
Jake is learning how to play the card game Dominion. In
Dominion, you can buy a variety of treasure, action, and
victory point cards – at the end of the game, the player with
the most victory points wins!
Each turn, each player draws $5$ cards and can use their action and
... | 29,371 |
Proving Equivalences
Description:
Consider the following exercise, found in a generic linear
algebra textbook.
* $A$ is
invertible.
* $Ax = b$ has
exactly one solution for every $n \times 1$ matrix $b$.
* $Ax = b$ is
consistent for every $n
\times 1$ matrix $b$.
* $Ax = ... | 29,372 |
Prozor
Description:
Young Marin, now already a respectable star of Croatian
cinematography, spends his free time looking out the window.
Unfortunately for him, the same activity is also taken up by a
few flies that have landed on his window and are looking into
the distance. Marin immediately hurried t... | 29,373 |
Prsteni
Description:
After an exhausting morning, Mirko fell asleep. His brother
Stanko, however, just awoke and, like his brother, is all about
excitement. Stanko found N rings of varying radii in the
garage. He arranged them on the floor so that each ring (except
the first and last) touches the ones ... | 29,374 |
Prva
Description:
Little Ivica solves crossword puzzles every day. In case you
haven’t seen one, a crossword puzzle starts on a grid of
$R \times C$ squares, each
of which is either empty or blocked. The player’s task is to
write words in consecutive empty squares vertically (top down)
or horizonta... | 29,375 |
Pseudo-random Numbers
Description:
Access to high-quality randomness is very important for many
applications, especially in cryptography. Radioactive decay is
sometimes used as a source of “true randomness”, but this is a
fairly slow procedure for getting random numbers. Also, in many
applications it i... | 29,376 |
Pseudoprime numbers
Description:
Fermat’s theorem states that for any prime number
$p$ and for any integer
$a \ge 0$, $a^ p \equiv a \pmod{p}$. That is, if
we raise $a$ to the
$p$th power and divide by
$p$, the remainder is
$a$. Some (but not very
many) non-prime values of $p$, known as bas... | 29,377 |
Ptice
Description:
Adrian, Bruno and Goran wanted to join the bird lovers’
club. However, they did not know that all applicants must pass
an entrance exam. The exam consists of $N$ questions, each with three
possible answers: A, B and C.
Unfortunately, they couldn’t tell a bird from a whale so
they ar... | 29,378 |
Pub Crawl
Description:
Fritjof is going to his first ever pub crawl. Since he
doesn’t want to go all out on his very first time, he’s decided
that he’s only going to visit a single pub. As he likes all
pubs equally much he will stay at the pub for an equal amount
of time regardless of which pub it is. ... | 29,379 |
Pub-lic Good
Description:
A bit over three years ago, you were elected president of
the glorious and picturesque country of Molvanîa, a land
untouched by modern dentistry. To secure your landslide victory
in the election you had to make a few promises, some of which,
with the clarity of hindsight, may ... | 29,380 |
Pulling Their Weight
Description:
To save money, Santa Claus has started hiring other animals
besides reindeer to pull his sleigh via short term ‘gig’
contracts. As a result, the actual animals that show up to pull
his sleigh for any given trip can vary greatly in size.
Last week he had $2$
buffalo, $... | 29,381 |
Pulverizing Pancake
Description:
You were walking along minding your own business when you
were suddenly ambushed by a horde of wild Pokemon. The world is
a grid with $N$ columns
numbered from $1$ to
$N$, and each Pokemon is
in one of the columns hoping to trap you, but you have come
prepared. ... | 29,382 |
Pumpkin Patch
Description:
Pumpkin Pete is trying out a new type of “rapid-growth”
pumpkin seed that he bought from the farmer’s market. Without
looking at the directions, Pumpkin Pete tears through the
packaging and plants the seeds he has into his pumpkin patch.
Unbeknownst to Pumpkin Pete, his rival... | 29,383 |
Purple Rain
Description:
On close observation however, Prof. Nelson Rogers finds that
actually it is a mix of Red and Blue drops.
In his zeal, he records the location and color of the
raindrops in different locations along the peninsula. Looking
at the data, Professor Rogers wants to know which part of
... | 29,384 |
Putnik
Description:
Chances are that you have probably already heard of the
travelling salesman problem. If you have, then you are aware
that it is an NP-hard problem
because it lacks an efficient solution. Well, this task is an
uncommon version of the famous problem! Its uncommonness
derives from ... | 29,385 |
Putovanje
Description:
Young Mislav loves spending time in nature and, most of all,
he loves spending time in forests. The fresh air and lovely
sounds make the forest his favourite location. Mislav has
decided to spend this afternoon in a forest and, because he’s
so practical, he’s also decided to stuf... | 29,386 |
Puzzle
Description:
Sam loves all kinds of puzzles. Recently he received a very
special puzzle – a grid of $N
\times M$ squares, each square is occupied either by a
red or by a blue pebble. The puzzle is controlled by several
buttons.
Each row of the grid has its corresponding black button.
When y... | 29,387 |
Pyramid Construction
Description:
Kim likes building Lego pyramids and now wants to build one
of height $H$. How
many more bricks are needed if Kim already has $N$ bricks of size $2 \times 2$ and $M$ bricks of size $4 \times 2$? A pyramid is hollow and
consists of $H$ layers, as
shown in the image. The... | 29,388 |
Pyro Tubes
Description:
The Impressively Calculable Pyrotechnics Company has been
contracted to provide certain stage effects for a rock
festival. In particular, fire is requested (because fire makes
the crowd go wild). In order to pull this off, the main stage
is outfitted with a series of tubes, each... | 29,389 |
Pönnukökur
Description:
Signý is making pancakes. The pancakes have two sides, side
$0$ and side $1$, and they have been arranged into
a row. Thus what side faces up can be denoted by binary.
Initially side $0$ faces
up. Sometimes when she’s cooking the pancakes she flips them.
If she flips a panca... | 29,390 |
Púsluspil
Description:
Davíð really enjoys jigsaw puzzles, so much so that he
recently bought one from Baldi’s Puzzle Shop. He eagerly goes
home and starts working on the puzzle. When he’s almost done,
Davíð realises that there are some puzzle pieces missing in the
almost completed puzzle, but the box ... | 29,391 |
Pýramídasala
Description:
The company Pyramids Inc. sells hundreds of pyramids each
year. Their business model is different from what is commonly
known in companies. Pýramídas, the owner, hired employees to
sell for the company. His employees then hired their own
employees, which in turn hired their ow... | 29,392 |
QC QC
Description:
Innovative Computable Quality Control (ICQC) has developed
a ground-breaking new machine for performing, well,
quality control. Thanks to its novel Deep Intelligence
technology, an ICQC quality control (QC) machine can
automatically, with $100\%
$ accuracy, detect manufacturing e... | 29,393 |
Qanat
Description:
A qanat is an irrigation system widely used to
deliver water in hot, arid climates. The technology was
originally developed by Persians over 2000 years ago. In
Morocco, qanats are known as khettara and are still used today
in the southern part of the country.
The basic feature of a ... | 29,394 |
Quadrant Selection
Description:
A common problem in mathematics is to determine which
quadrant a given point lies in. There are four quadrants,
numbered from $1$ to
$4$, as shown in the
diagram below:
For example, the point $A$, which is at coordinates
$(12, 5)$ lies in quadrant
$1$ since both... | 29,395 |
Quadratic Dissonance
Description:
Oh no! Both you and your lab partner forgot to complete one
part of the latest assignment and it is due in an hour!
The purpose of this lab assignment was to have you analyze
some experimental data, find a quadratic function that best
describes the data, and report the mi... | 29,396 |
Quadratic Residues
Description:
The great German mathematician C. F. Gauss studied
the criteria for the equation
to have an integer solution $x$ for a prime $p$. For some tuples $a$ and $p$ there are several solutions,
whereas others have none. For instance, $x^2\equiv 2 \pmod{7}$ has the
solutions $3+7k$... | 29,397 |
Qualification Round
Description:
You’ve just advanced from the Qualification Round of Google
Code Jam Africa 2010, and you want to know how many of your
fellow contestants advanced with you. To give yourself a
challenge, you’ve decided only to look at how many people
solved each problem.
The Qualifica... | 29,398 |
Quality-Adjusted Life-Year
Description:
The Quality-Adjusted Life-Year (QALY) is a way to measure a
person’s quality of life that includes both the quality and the
quantity of life lived.
The quality of life lived can be quantified as a number
between $0$ and
$1$. If someone is living
with perfect... | 29,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.