task stringlengths 0 154k | __index_level_0__ int64 0 39.2k |
|---|---|
Exchange Rates
Description:
Now that the Loonie is hovering about par with the
Greenback, you have decided to use your $1000 Canadian dollars
entrance scholarship to engage in currency speculation. So you
gaze into a crystal ball which predicts the closing exchange
rate between Canadian and U.S. dollar... | 27,500 |
Exchange Students
Description:
Determine the minimum number of exchanges needed to arrange
the students in the photographer’s preferred order, and find a
suitable sequence of exchanges of this minimal length. The
photographer only has time for at most $2\cdot 10^5$ exchanges. If more are
needed, you on... | 27,501 |
Exciting Tournament
Description:
A group of players compete in a no-holds-barred
tournament.
Each player has a unique skill level (represented as an
integer). In each game, two players play, and the player of
higher skill level wins. The player of lower skill level is
immediately eliminated from the t... | 27,502 |
Exhausting Errands
Description:
Dolly the delivery drone is out for a busy working day. It
has to complete $n$
errands in a street where $\ell
$ houses are lined up in a row, numbered in ascending
order as $1, \dots , \ell
$. The distance between adjacent houses is $1$. Each errand consists of pick... | 27,503 |
Exhaustive Experiment
Description:
The vacuum system contains a wall with possibly leaking
components. The physicists have performed vacuum leak tests on
some of these components by flushing them with helium gas and
then noting down whether their mass spectrometer detected any
spike in helium in the va... | 27,504 |
Exits in Excess
Description:
You own a disco called the Boogie Always Persists Club. The
club is famous for its multiple interconnected rooms to twist
and shout in. The rooms and the corridors between them form a
maze-like structure and for added bonus you have made all the
corridors one-way. However, ... | 27,505 |
Exoplanet Lighthouse
Description:
As humanity travels to extraterrestrial bodies, the need for
human or robotic explorers to determine their location on the
surface will be critical. Lighthouses offer a simple solution
as line-of-sight navigational beacons. An important measurement
for lighthouses is g... | 27,506 |
Exotic Fruit
Description:
Nicole wants to get into the market of exotic fruit. She is
planning to sell up to $N$
fruits this year, but she hasn’t yet decided which kinds. She
has seeds for $K$
different kinds, which she can plant any number of fruits
of.
However, planting fruits uses space, water,... | 27,507 |
Expanding Rods
Description:
When a thin rod of length $L$ is heated $n$ degrees, it expands to a new
length $L’ = (1+n \cdot C) \cdot
L$, where $C$ is
the coefficient of heat expansion.
When a thin rod is mounted on two solid walls and then
heated, it expands and takes the shape of a circular segment,... | 27,508 |
Expected Earnings
Description:
Johan likes to play at the casino, but he wonders if a
particular slot machine is worth playing on.
If Johan wins a game on the machine, he gets $n$ Swedish kronor. He wins with the
probability $p$. It costs
$k$ kronor to play.
Since Johan is not the sharpest tool in the sh... | 27,509 |
Expected Flight Delay
Description:
Once upon a time, there was a businesswoman named Grace who
lived in New York City, New York and frequently traveled to Des
Moines, Iowa on a regular daily flight for work. Unfortunately,
there was one big problem: Flights from New York to Des Moines
were notoriously ... | 27,510 |
Expecting Rain
Description:
The Bluewater Geocloud Organization (BGO) has recently
developed brand new software able to predict with pinpoint
precision at which second any particular cloud will start and
stop raining, and with what intensity. There is, however, some
uncertainty about how a cloud will m... | 27,511 |
Expeditious Cubing
Description:
Claire is competing in the most popular competition:
speedsolving the $3\times 3\times
3$ Rubik’s cube, pictured on the right. Each contestant
needs to solve the cube five times, each time with a different
random scramble. After all solves are completed, the best and
... | 27,512 |
Exploding Batteries
Description:
Oops! The latest shipment of laptop batteries has a minor
issue. Nothing major, just a slight tendency to explode when
being pushed too hard, that’s all. Some of our customers keep
pestering us about this tiny defect however, and the media just
won’t give us a break.
S... | 27,513 |
Exploding CPU
Description:
The well known hardware manufacturing company Processors
for Professors is about to release a highly specialized
CPU with exceptional functionality in, amongst other areas,
number theory. It has, for example, an instruction PFACT that takes one parameter and returns
all prime... | 27,514 |
Exploding CPU 2
Description:
The well known hardware manufacturing company Processors
for Professors is about to release a highly specialized
CPU with exceptional functionality in, amongst other areas,
number theory. It has, for example, an instruction PFACT that takes one parameter and returns
all pri... | 27,515 |
Exploding Kittens
Description:
Today your friends are playing a game of Exploding Kittens.
On a player’s turn, she must perform the following actions in
order:
* Draw a single card from the top of the deck.
* If the drawn card is an “Exploding Kitten”, she must
leave the game unless she has a “Defuse... | 27,516 |
Explosion Exploit
Description:
You are contemplating your next move. You want to play an
“Explosion” spell which deals $d$ units of damage randomly
distributed across all minions. The damage is dealt one unit at
a time to some remaining minion on the board. Each living
minion (including your own) has t... | 27,517 |
Exponent Exchange
Description:
Alice and Bob are playing a cooperative game. They hold
$b^ p$ dollars between
them, for given integers $b$ and $p$. Alice initially holds
$x$ dollars, and Bob holds
$b^ p - x$ dollars. Alice
and Bob want to consolidate their money, so one person holds
all the mon... | 27,518 |
Exponentially Fun Problem
Description:
In your spare time, you’ve been at ETA building a machine with a
function $S(X) = N$ that
given a number $X$ outputs
a number $N$, where
$N$ is the sum of the
prime factors of $X$
counted with multiplicity. For example, $S(12) = S(2 \cdot 2 \cdot 3) = 2 + ... | 27,519 |
Exponentiation
Description:
There are $n$ integer
variables $x_1, x_2, \dots ,
x_n$. At the start, each variable is set to $2023$. You have to perform
$m$ instructions of the
following two types:
* Operations, of the form
“! $i$ $j$”, where $i \neq j$. This means that
$x_i$ gets set to... | 27,520 |
Exponial
Description:
* Exponentiation: $42^{2016}
= \underbrace{42 \cdot 42 \cdot \ldots \cdot 42}_{2016\text
{ times}}$.
* Factorials: $2016! = 2016
\cdot 2015 \cdot \ldots \cdot 2 \cdot 1$.
Exponentiation: $42^{2016}
= \underbrace{42 \cdot 42 \cdot \ldots \cdot 42}_{2016\text
... | 27,521 |
Extensive Or
Description:
Consider a very large number $R$ in a compressed format. It is
compressed as a binary string $s$, and an integer $k$. Start with the empty string, and
append $s$ to it
$k$ times to get the
binary representation of $R$. The string $s$ is guaranteed to have a leading
$1$. No... | 27,522 |
Eye of Sauron
Description:
Little Elrond is obsessed with the Lord of the Rings series.
Between lectures he likes to doodle the central tower of the
great fortress Barad-dûr in the margins of his notebook.
Afterward, he always double checks his drawings to ensure they
are accurate: with the Eye of Saur... | 27,523 |
FBI Universal Control Numbers
Description:
The FBI has recently changed its
Universal Control Numbers (UCN) for identifying
individuals who are in the FBI’s fingerprint database to an
eight digit base $27$
value with a ninth check digit. The digits used are:
```
0123456789ACDEFHJKLMNPRTVWX
```
Some l... | 27,524 |
FYI
Description:
In the United States of America, telephone numbers within an
area code consist of seven digits: the prefix number is the
first three digits and the line number is the last four digits.
Traditionally, the $555$
prefix number has been used to provide directory information
and assista... | 27,525 |
Facilities
Description:
It is time to build new restrooms for your bar. Restrooms
are expensive, so you want to build as few as possible while
ensuring that every guest has access to an unoccupied restroom
without having to stand in line. Using discarded plastic cups
you have collected the biometric da... | 27,526 |
Facility Locations
Description:
The HDWBP Inc. has $n$ clients and needs to service these
clients by opening $k$
facilities. Each opened facility can serve any number of
clients and each client must be served by an open facility.
There are $m$ potential
locations for these $k$
facilities. The c... | 27,527 |
Factor-Free Tree
Description:
A factor-free tree is a rooted binary tree where
every node in the tree contains a positive integer value that
is coprime with all of the values of its ancestors. Two
positive integers are coprime if their greatest common divisor
equals $1$.
The inorder sequence of a root... | 27,528 |
Factor-Full Tree
Description:
Aivar is very good at number theory. In fact, it is the only
thing he is good at, but this doesn’t stop him from achieving
great things. However, if Aivar wants to solve any problem in
life, he first needs to convert it to number theory.
For example, consider a rooted tree wi... | 27,529 |
Factorial Power
Description:
Given integers $n$ and
$m$, determine the largest
$k$ for which $n^ k$ divides $m! = 1 \cdot 2 \cdots (m - 1) \cdot
m$.
## Input
The first and only line of input contains the integers
$n$ and $m$ ($2
\le n, m \le 10^{14}$).
## Output
Output the integer $k$
from ... | 27,530 |
Factors
Description:
The fundamental theorem of arithmetic states that every
integer greater than 1 can be uniquely represented as a product
of one or more primes. While unique, several arrangements of
the prime factors may be possible. For example:
Let $f(k)$ be the
number of different arrangements o... | 27,531 |
Factovisors
Description:
The factorial function, $n!$ is defined thus for $n$ a non-negative
integer:
We say that $a$ divides
$b$ if there exists an
integer $k$ such that
$k \cdot a = b$.
## Input
The input to your program consists of several lines, each
containing two non-negative integers, $n$... | 27,532 |
Factstone Benchmark
Description:
Amtel will use a new benchmark – the Factstone – to
advertise the vastly improved capacity of its new chips. The
Factstone rating is defined to be the largest integer
$n$ such that $n!$ can be represented as an unsigned
integer in a computer word.
Given a year $1960 \l... | 27,533 |
Fading Wind
Description:
You’re competing in an outdoor paper airplane flying
contest, and you want to predict how far your paper airplane
will fly. Your design has a fixed factor $k$, such that if the airplane’s
velocity is at least $k$,
it will rise. If its velocity is less than $k$ it will descend.
... | 27,534 |
Fail Fast
Description:
A large software project has been written with many
automated tests to help ensure quality. When a change is made
to the source code, all of the automated tests are run in some
sequence to help show that the code change has not broken some
pre-existing functionality. The code cha... | 27,535 |
Fail Them All!
Description:
You are an instructor for an algorithms course, and your
students have been saying mean things about you on social
media. Those jerks! Being a vengeful and dishonest instructor,
you are going to make them pay.
You have given your students a True/False exam. For each
questio... | 27,536 |
Failing Roads
Description:
There are $n$ towns in
the kingdom of Failland. In the past, Failland used to have an
excellent system of roads, connecting each town directly to
each other, without any two roads crossing – they used a
complicated system of bridges to ensure this. Recently,
however, the ... | 27,537 |
Fair Bandwidth Sharing
Description:
Dreaming of revolutionizing the tech industry and making the
world a better place, Ging has recently moved to Silicon Valley
to found his own startup, Katbook.
Katbook allows users to download cat pictures. Katbook is
capable of transferring $t$ bits per second.
There ... | 27,538 |
Fair Division
Description:
It’s your friend’s birthday, and you and some other people
decided to buy him a copy of StarCraft II, because who wouldn’t
want to have that?
You agreed to divide the costs as fairly as possible. Since
some of you have more money available than others, you also
agreed that n... | 27,539 |
Fair Division
Description:
Fortunately, pirates in the 21st century can use a computer
to avoid this lengthy process and constant nitpicking when the
fraction $f$ does not
exactly divide the loot at some step. You have been captured by
the pirates and asked to come up with a suitable fraction
$f$. ... | 27,540 |
Fair Divisions
Description:
Lily and Severus discovered very special magical plants that
glowed in the dark in the field behind their favorite
playground. The children greatly admired the plants and loved
to sit in the field, watch the plants, and chat to each other.
Until one day, a quarrel (something... | 27,541 |
Fair Fruitcake Fragmenting
Description:
Frida’s birthday is just coming up, and as her best friend,
you obviously baked a cake for her. Since you know that Frida
loves rotational symmetry, you thought to bake a cake that
looks the same from above when rotated by $180^\circ $. Of course, you could
have ... | 27,542 |
Fair Play
Description:
Together with your coworker, Larry, you are organizing the
exciting Billiards and Pool Competition for your coworkers in
your small company. You and Larry are usually on the same page,
and surely he will approve of your latest idea. You even bought
a nice prize for your coworkers... | 27,543 |
Fair Warning
Description:
On our planet, Jamcode IX, three Great Events occurred.
They happened $26\, 000$,
$11\, 000$ and
$6\, 000$ slarboseconds
ago. In $4\, 000$
slarboseconds, the amount of time since all of those events
will be multiples of $5\,
000$ slarboseconds, the largest possible... | 27,544 |
Fair brewing
Description:
United Brewery was born through fusions and mergers
of various small and local breweries that each produced their
own particular kind of beer. The recipes of the smaller
breweries were strongly loved by local fan bases, and the beers
continued to be brewed at United Brewery. I... | 27,545 |
Fake Arithmetic Sequence
Description:
This problem has nothing to do with Arithmetic Sequence, but
I thought it did, hence the name.
You’re given a sequence $a$ of length $n$ containing only integers. Find the
longest subsequence $b$ of
$a$ such that for all
$3 \leq i \leq length(b)$,
$b[i] = b[i-... | 27,546 |
Fake Graph Theory
Description:
SoCCat challenges you to solve the following combinatorics
problem:
Given a graph $G$ with
$4n$ vertices, along with
two permutations $p$ and
$q$, each with size
$2n$ on the set
$\{ 1, 2, \ldots , 2n\}
$.
Add the following $4n$
edges:
* For each $i \in ... | 27,547 |
Fake It `Til You Make It
Description:
Fluttershy has been put in charge of a high-end boutique in
Manehattan, and she needs to deal with the customers that come
in.
It is well-known that Fluttershy is, well, very shy. So shy,
in fact, that the only time she feels comfortable dealing with
a customer is... | 27,548 |
Fake News!
Description:
Excitement is rapidly increasing in anticipation of the
concluding debate at the 0x7E4 Undemocratic Inclinational
Unconvention, where the party’s candidate for the office of
Student Assistant to the Old Chemistry Building Assistant
Printer Service Technician’s Assistant will be ... | 27,549 |
Fake Scoreboard
Description:
As you know, after the award ceremony of SWERC it is
customary to publish a complete scoreboard with detailed
information on the submissions and verdicts received. However,
due to the buggy contest management system, most of the
relevant data are not being recorded today. C... | 27,550 |
Fake Snowflake
Description:
Alexander is a climate change denier and wants to prove to
Joshua that the Earth is not getting warmer at all. Alexander
argues that it has already snowed several times in November,
which suggests that the temperature is dropping. Joshua, who
mostly stays indoors, hasn’t not... | 27,551 |
Faktor
Description:
The impact factor of a scientific journal is a measure
reflecting the average number of citations to articles
published in science journals. For this task we are using a
simplified formula for calculating the impact
factor:
Rounding is always performed upwards. For example the impa... | 27,552 |
Falcon Dive
Description:
“Our high speed camera failed at the most inappropriate
moment,” said the director of the ZOO. “This sequence with the
falcon hurtling towards the ground at $250\, \mathrm{km}/\mathrm{h}$ is
absolutely stunning. I had hopes that we could use the last
frame as a promotion pictur... | 27,553 |
Falling Apart
Description:
After acquiring a new integer and showing it off to other
couples at a cocktail party, Alice and Bob headed home for a
good night of sleep. As their integer was quite large, they
were forced to carry it together. Then, on the Boole Boulevard,
right by the Bayes Bay, disaster ... | 27,554 |
Falling Apples
Description:
* The obstacles do not move.
* Whenever there is an empty cell immediately below an
apple, the apple moves into the empty cell.
The obstacles do not move.
Whenever there is an empty cell immediately below an
apple, the apple moves into the empty cell.
Print out the f... | 27,555 |
Falling Mugs
Description:
Susan is making high-speed videos of falling coffee mugs.
When analyzing the videos she wants to know how big the mugs
are, but unfortunately they all got destroyed during filming.
Susan knows some physics though, so she has figured out how far
they moved between different vid... | 27,556 |
Falling Snow
Description:
In the cold and remote areas of northern Sweden, a young boy
named Anton lives. Being born to a family of pistvakts
(an occupation that involves drinking moonshine called
“bäverhojt”, hunting bears and occasionally handling safety in
the mountains), he has been handed the resp... | 27,557 |
Falling Snow
Description:
Princess Kaguya is running through the snowy mountains!
However, since it has been snowing quite hard, the terrain is
very rough, and thus she would like to plan around it.
Kaguya has created a mental image of what the snow was like
some time ago, which may include snow suspended... | 27,558 |
False Sanctum
Description:
Kivotos is in deep trouble. Familiar yet different monsters
had made their appearance all over Kivotos, guarding what seems
to be False Sanctums. The students plan to destroy these
sanctums as fast as possible to stop the monster raid.
The hacker group of the Millenium Science S... | 27,559 |
False Sanctum: Act 2
Description:
At the other side of Kivotos, the Trinity General School
detected an abnormally high number of monsters in the school’s
underground system. While many students are trying their best
to fend off the monsters, Mika charges in to the center of the
anomaly, hoping to find ... | 27,560 |
False Sense of Security
Description:
Freddy discovered a new procedure to grow much bigger
cauliflowers. He wants to share this finding with his fellow
gardener Tommy but he does not want anyone to steal the
procedure. So the two gardeners agreed upon using a simple
encryption technique proposed by M. ... | 27,561 |
Familiar Digit
Description:
A digit is called familiar to an array of positive integers
if that digit appears in every elements of the array. For
example, an array $[14, 1470,
161240, 111000444]$ has $2$ familiar digits: $1$ and $4$. Also note that, $0$ is not a familiar digit because
$0$ doesn’t appea... | 27,562 |
Family DAG
Description:
In a perfect world, your family tree would form a complete
binary tree, with you at the root. You would have two different
parents who were distinct from yourself. You would have four
distinct grandparents who were distinct from your parents and
yourself, and so on.
Of course, ... | 27,563 |
Family Fares
Description:
After a long time apart, your family will gather next year
for a reunion in an idyllic village in the centre of the
country. Since everybody lives apart, most will need to travel
by train.
You are in charge of finding the best deal on tickets.
Everyone must take an optimal ro... | 27,564 |
Family Visits
Description:
You are a college student living on your own. However, your
doting family still likes to visit you, and they often stop by
to check on your room at night before going to dinner. Your
family will be worried if they find a mess in your room.
Therefore you make an effort to ensu... | 27,565 |
Famous Pagoda
Description:
In order to build a staircase to a famous pagoda on top of a
mountain, the local authority has identified $N$ positions along the mountain slope
$a_1, a_2, \ldots , a_ N$
where $a_ i$ is the height
of the $i$-th position and
$a_ i \leq a_{i+1}$ for
all $0<i<N$.
The c... | 27,566 |
Fancy Antiques
Description:
You are hosting a fancy party for fancy friends. And, like
any fancy party, you need to buy some fancy antiques to put up
around the venue (your house).
There is a set of $n$
fancy antiques that you need to buy. And there is a set of
$m$ fancy antique shops in
the city.... | 27,567 |
Fancy Fence
Description:
As laser fences are rather expensive, Lökas can only afford
to upgrade $K$ of the
fence posts to laser fence posts. If a set of posts are
upgraded, the lasers will protect all the onions lying strictly
within the convex hull of the selected fence posts. This may
not be all ... | 27,568 |
Fancy Fence (easy)
Description:
Oskar really loves onions. Unfortunately, the onions he
loves belong to the local vegetable farmer, Lökas Tomatcek.
Since Oskar is very cheap, he simply steals Lökas’ onions from
the large, convex, onion field. For obvious reasons, Lökas does
not approve of this. Rather ... | 27,569 |
Fantastic Problem
Description:
Andrew, the world-renowned problem writer, has finally
decided to retire. However, he first wishes to put out one
final masterpiece to seal his legacy and amaze competitors the
world over. As you’re his favorite pupil, he’s asked you to
help him proofread it before he sub... | 27,570 |
Fantasy Draft
Description:
In fantasy hockey, there are $n$ team owners that each selects
$k$ hockey players. To
determine which owner gets which players, the owners hold a
draft.
The draft proceeds as follows: the first owner may select
any player, then the second owner can select any player except
... | 27,571 |
Farey Sequence Length
Description:
Given a positive integer, $N$, the sequence of all fractions
$a / b$ with $0 \le a \le b$, $1 \le b \le N$ and $a$ and $b$ relatively prime, listed in
increasing order, is called the Farey
Sequence of order $N$.
For example, the Farey Sequence of order
$6$ is:
Fo... | 27,572 |
Farey Sums
Description:
Given a positive integer, $N$, the sequence of all fractions
$a / b$ with $0 \le a \le b$, $1 \le b \le N$, and $a$ and $b$ relatively prime, listed in
increasing order, is called the Farey Sequence of order
$N$.
For example, the Farey Sequence of order $6$ is:
If the denominators... | 27,573 |
Farmer's Field
Description:
Taeko Okajima is helping her relatives with their safflower
field. She needs your help eliminating weeds from the safflower
field. Her field is arranged in a $1$ dimensional line of units, where
each unit is either a safflower crop, empty space, or weed,
denoted by $C$,
... | 27,574 |
Farming Mars
Description:
It has been ten years since the miserable day that you won a
one-way ticket to Mars on a game show. Your colony’s attempt at
terraforming Mars has faced nothing but hardship during that
time. The latest disaster: a complete failure of the potato
crop. You will have to start pl... | 27,575 |
Fast Food Prizes
Description:
Around regional contest time, the Canadian branch of a
popular fast food restaurant usually runs a game to promote its
business. Certain food items provide stickers, and certain
collection of different stickers can be converted to cash
prizes. If a prize requires sticker t... | 27,576 |
Fast Fourier Transform
Description:
You are given two polynomials. You should simply print their
product. This time you have to do it fast though.
## Input
The first line of input contains two positive integers
$n, m$, the number of
coefficients in each polynomial. The next two lines contain one
poly... | 27,577 |
Faster Than Light
Description:
Faster Than Light (FTL) is a space-based top-down
strategy game by Subset Games. You control a ship which belongs
to the Galactic Federation and have to fight a ship of
the Rebel Faction. The enemies’ spaceship is
represented by a set of axis-aligned non-intersecting
... | 27,578 |
Fastest Available Route
Description:
Your GPS has been directing you to an unknown destination
for the past several hours. You are curious about where it will
take you to, and how long the remaining drive will be. You try
to look at the display of your GPS to find out.
The screen of your GPS can be modele... | 27,579 |
Fastest Speedrun
Description:
The classic video game “Prince of Python” comprises
$n$ levels, numbered from
$1$ to $n$. You are going to speedrun this
game by finishing all of the levels as fast as possible, and
you can beat them in any order that you want.
You enter each level equipped with one of $n... | 27,580 |
Faucet Flow
Description:
The faucet is above location $x=0$, and the dividers are located at
$x=-1, -3, -5, \ldots , \text
{left}_ x$ and $1, 3, 5,
\ldots , \text {right}_ x$. The dividers are attached
perpendicular to the floor and sides of the aquarium, and have
various heights. The aquarium’s le... | 27,581 |
Faulty Robot
Description:
As part of a CS course, Alice just finished programming her
robot to explore a graph having $n$ nodes, labeled $1, 2, \ldots , n$, and $m$ directed edges. Initially the
robot starts at node $1$.
While nodes may have several outgoing edges, Alice
programmed the robot so that any n... | 27,582 |
Faulty Sprinklers
Description:
Bob’s green thumb has recently gotten him a job as a
gardener at a local park. Along with caring for all the plants
in the garden, he was also given the responsibility of
completely redesigning the park with all new equipment and
green spaces.
Unfortunately for Bob, he’s... | 27,583 |
Feeding the Herrings
Description:
Zookeper Willy is feeding herrings today. He is feeding them
to seals, as they are their preferred food. There are three
separate pools in which the seals live. The ZOO is a modern
institution and it demands their employees to keep track of
feeding habits of animals. T... | 27,584 |
Feistel Fun
Description:
A Feistel network, named after IBM researcher Horst
Feistel (1915–1990), is an important structure often used in
the design of symmetric-key ciphers known as block
ciphers. A block cipher encrypts binary data in
(relatively large) fixed-length chunks called blocks.
For a bl... | 27,585 |
Fence Bowling
Description:
Olav is spending an evening on his own, practicing in the
bowling hall. Annoyingly, the side-rails in his lane are stuck
in the active position, so if the ball goes out of bounds, then
it simply bounces back in. This seems unfair to Olav, so he
decide that any throw that does... | 27,586 |
Fence Fee
Description:
The National Crop Protection Commission (NCPC) is dedicated
to supporting local farmers by offering subsidies that are
proportional to the area of their crop fields. Each farmer can
have several crop fields, each uniquely shaped but
geometrically defined as a polygon, bounded by ... | 27,587 |
Fence Orthogonality
Description:
Evil bunnies are eating Freddy’s vegetables. In order to
stop them, he decided to build a fence enclosing all
vegetables in his garden. Freddy wants the fence to be as cheap
(i.e., short) as possible, but for technical reasons, he can
only build rectangular fences. For ... | 27,588 |
Fences Make Good Neighbors
Description:
The King of Gletrian has a large estate that he wishes to
divide up into triangular parcels which he then plans to give
to deserving (that is, wealthy) followers. The estate is a
convex polygon and already has fences around its borders, so
the only cost now will ... | 27,589 |
Fencing Lessons
Description:
Donald’s garden has $N$
trees and $M$ poles that
he has erected in strategic locations on integer meter
coordinates. He wants to start breeding squirrels on top of
these poles. Unfortunately there are lots of dangerous
predators in the area, so if he leaves the poles un... | 27,590 |
Fend Off Titan
Description:
You are a righteous knight in a kingdom with $N$ villages with $M$ bidirectional roads. The villages
are labeled from $1$ to
$N$ while the roads are
labeled from $1$ to
$M$. The $i$-th road connects two different villages $A_ i$ and $B_ i$ with a length of $W_ i$. No two roa... | 27,591 |
Fenwick Tree
Description:
A Fenwick Tree (also known as a Binary Indexed Tree) is a
data structure on an array which enables fast ($O(\log n)$) updates and prefix sum
queries on the underlying data.
For this problem, implement a Fenwick Tree to support
operations of two types: (a) increment an element in ... | 27,592 |
Ferry Loading
Description:
Before bridges were common, ferries were used to transport
cars across rivers. River ferries, unlike their larger cousins,
run on a guide line and are powered by the river’s current. Two
lanes of cars drive onto the ferry from one end, the ferry
crosses the river, and the car... | 27,593 |
Ferry Loading
Description:
A ferry is being loaded with cars, and there’s a long line
of cars queued up to enter the ferry. Since the time between
the ferry’s departures is very long, it’s important that as
many cars as possible can board the ferry. The shipping
company, Crappy Shippers Inc., has latel... | 27,594 |
Ferry Loading III
Description:
Before bridges were common, ferries were used to transport
cars across rivers. River ferries, unlike their larger cousins,
run on a guide line and are powered by the river’s current.
Cars drive onto the ferry from one end, the ferry crosses the
river, and the cars exit fr... | 27,595 |
Ferry Loading IV
Description:
Before bridges were common, ferries were used to transport
cars across rivers. River ferries, unlike their larger cousins,
run on a guide line and are powered by the river’s current.
Cars drive onto the ferry from one end, the ferry crosses the
river, and the cars exit fro... | 27,596 |
Ferry Loading V
Description:
Before bridges were common, ferries were used to transport
vehicles across rivers. River ferries, unlike their larger
cousins, run on a guide line and are powered by the river’s
current. Two lanes of vehicles drive onto the ferry from one
end, the ferry crosses the river, a... | 27,597 |
Ferskasta Jarmið
Description:
Bjarki worries a lot about his social media performance. He
cares deeply about being hip and cool in the eyes of the
current youth. After much research and extensive measurements,
he has determined two main factors deciding how much attention
a given meme will get on socia... | 27,598 |
Fiat
Description:
“Your wish is my command.” –Genie
(Aladdin).
The king of Rectangle Land has just received a royal gift, a
stairstep-shaped piece of wood with $N$ steps, from the neighboring
kingdom of Stairstep-Shaped Piece of Wood With $N$ Steps Land.
The king accepted the gift out of courtesy, but h... | 27,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.