task
stringlengths
0
154k
__index_level_0__
int64
0
39.2k
Union-Find Description: ## Input The first line of input consists of two integers $N$ and $Q$, where $1 \le N \le 1\, 000\, 000$ is the number of elements in the base set and $0 \le Q \le 1\, 000\, 000$ is the number of operations. Then follow $Q$ lines, one per operation. There are two types of opera...
30,400
Unique Dice Description: You are about to leave home for your weekly game of Pumpkins and Flagons (P&F) when a text comes in asking you to bring a large collection of identical P&F dice. They have asked the right person, for you have a very large collection of P&F dice which, unfortunately, is currentl...
30,401
Unique Snowflakes Description: Emily the entrepreneur has a cool business idea: packaging and selling snowflakes. She has devised a machine that captures snowflakes as they fall, and serializes them into a stream of snowflakes that flow, one by one, into a package. Once the package is full, it is close...
30,402
Units Description: The use of units is ubiquitous in science. Physics uses units to distinguish distance (e.g., meters, kilometers, etc.), weight (e.g., kilograms, grams), and many other quantities. Computer scientists have specialized units to describe storage capacity (e.g., kilobytes, megabytes, etc...
30,403
University Zoning Description: In an effort to contain a recent pandemic, a certain university has decided to implement a zoning system. The school campus is a rectangular plot of land and is divided into a grid with $R$ rows and $C$ columns. Rows and columns are numbered from $1$ to $R$ and $C$ re...
30,404
Unlock Pattern Description: A pattern is more complex if the total length of the stroke is longer. Given an unlock pattern, can you calculate its length? We assume that the pivots are aligned on a unit grid, and the stroke moves in a straight line between two consecutive pivots. The sample input corre...
30,405
Unlock Pattern II Description: Consider the directional changes along the unlock pattern. The pattern may take a left turn (‘L’), a right turn (‘R’), go straight (‘S’), or turn around (‘A’) at each pivot except for the first and the last pivot. If we write down the directional changes into one string, ...
30,406
Uno Reverse Description: You just returned to your Uno game after a much-needed visit to the restroom. When you left, the player to your left had the turn, with play going clockwise. You can see that in your absence, no cards were drawn, only Reverse cards were played, and the turn just passed. Is it p...
30,407
Unown Code Description: Professor Rowan has been researching a group of Unown in the Solaceon Ruins who have come up with a secret code. Each Unown is shaped like a digit, and they have grouped together to form $N$ numbers ($a_1, \ldots , a_ N$). Their code is the smallest integer $c > 1$ such that...
30,408
Unown Code (Easy) Description: Note that this is an easier version of the problem unowncode. Professor Rowan has been researching a group of Unown in the Solaceon Ruins who have come up with a secret code. Each Unown is shaped like a digit, and they have grouped together to form $N$ numbers ($a_1, \ld...
30,409
Unread Messages Description: There is a group of people in an internet email message group. Messages are sent to all members of the group, and no two messages are sent at the same time. Immediately before a person sends a message, they read all their unread messages up to that point. Each sender also read...
30,410
Unreal Estate Description: A dishonest landowner is selling off plots of land. He’s selling it in large, rectangular plots, but many of the plots overlap, so he’s actually selling the same land multiple times! It’s not real estate, it’s unreal estate! Given a description of the possibly overlapping rectan...
30,411
Unterwave Distance Description: The year is 2312, and Humanity’s Rush to the Stars is now $200$ years old. The problem of real-time communication between star systems remains, however, and the key is the unterwave. Unterwave (UW) communication works as follows: direct UW links have been set up between...
30,412
Unusual Darts Description: In the game of Unusual Darts, Alice throws seven darts onto a $2$-foot by $2$-foot board, and then Bob may or may not throw three darts. Alice’s seven darts define a polygon by the order in which they are thrown, with the perimeter of the polygon connecting Dart $1$ to D...
30,413
Up a Tree Description: Anatoly Cheng McDougal is a typical student in many ways. Whenever possible he tries to cut and paste code instead of writing it from scratch. Unavoidably this approach causes him problems. For example, when he first learned about preorder, inorder and postorder traversals of tre...
30,414
Up and Away Description: Steve has set up $n$ bases on multiple mountains around his house, located at mountain $1$. He wants to fly from one base to another using his elytra and get to his vacation house at mountain $x$. Unfortunately, flying from one base to another takes time, and he can only do...
30,415
Up and Away Again Description: Another year has passed, and Steve wants to travel to his vacation house again! There are still $n$ bases located on mountains located around his house. Steve is located at mountain $1$ and his vacation house is at mountain $x$. This year, the Biomes Ski Corporation has buil...
30,416
Up and Down Description: Given a sequence of integers with length $N$, find the maximum length of a subsequence that strictly increases and then strictly decreases; the last position of strictly increasing must coincide with the first position of strictly decreasing. A subsequence can be obtained from ...
30,417
Upplega Description: It is only truly winter once the snow has settled on all the branches of the $N$ trees on the street outside your house. The street with all the trees can be represented in an arbitrarily large grid. Along the street, the $N$ trees stand in a row. The trunk of each tree $i$ is ...
30,418
Uppröðun Description: One thing the planning committee has to do is decide what team should sit in what classroom. There are $N$ classrooms and $M$ contestants. The classrooms are roughly the same size, so it is best if the teams are assigned to the rooms in as equal numbers as possible. For example if ...
30,419
Uprooted Description: King Sombra was finally defeated, but at what cost? The Tree of Harmony, a magical tree that once held the Elements of Harmony—six supernatural artifacts containing the most powerful magic in all of Equestria—was destroyed in the war. Without it, Equestria is the most vulnerable it h...
30,420
Urban Design Description: ## Input Input begins with an integer $S$ on a single line, giving the number of streets ($1 \le S \le 10\, 000$). The next $S$ lines of input each contain four integers $x_1$, $y_1$, $x_2$, and $y_2$, specifying the coordinates of two distinct points $(x_1, y_1)$ and...
30,421
Using Digits Description: He must begin by stepping onto the square closest to himself, which we can think of as square $(1, 1)$, and walk to some other square, which we can think of as square $(X, Y)$ for some $X, Y > 1$. Each step he takes is in either the positive-X or positive-Y direction, one square a...
30,422
Uuu Description: Unununium (Uuu) was the name of the chemical element with atom number 111, until it changed to Röntgenium (Rg) in 2004. These heavy elements are very unstable and have only been synthesized in a few laboratories. You have just been hired by one of these labs to optimize the algori...
30,423
Uzastopni Description: Petar is throwing a birthday party and he decided to invite some of the employees of his company where he is the CEO. Each employee, including Petar, has a unique label from $1$ to $N$, and an accompanying type of jokes they tell $V_ i$. Also, each employee of the company except...
30,424
V Description: Zvonko is playing with digits again, even though his mother has warned him that he is doing too much math and should go outside to play with his friends. In his latest game, Zvonko looks for multiples of an integer $X$, composed only of certain digits. A multiple of $X$ is any number di...
30,425
Vaccine Efficacy Description: To determine the efficacy of a vaccine against a disease, a clinical trial is needed. Some participants are given the real vaccine, while others are given a placebo as the control group. The participants are tracked to determine if they are infected by three different stra...
30,426
Vacuum Tubes Description: ## Task Given a set of tube lengths and the two distances $L_1$ and $L_2$, find four tubes with the total length being as long as possible under the constraint that the sum of the first two tube lengths is at most $L_1$ and the sum of the last two tube lengths is at most $L_2...
30,427
Vacuumba Description: You are developing software for a new generation of robotic floor vacuums. Being an inexpensive, mass market robot, this device has a fairly simple way of navigating around the room. It can turn by some angle to the left or right and then move forward in a straight line. A plan fo...
30,428
Vanishing Parentheses Description: Your top secret organization does a lot of cool stuff, and they don’t like to talk about what’s going on. However, they have told you that something has gone horribly wrong transferring very important mathematical formulae from somewhere to somewhere else; all of the ...
30,429
Variable Arithmetic Description: Computers are great at helping humans perform mathematical operations. A person can define names (aka variables) to represent numbers, and then write statements that have deeper semantic meaning. For example, rather than ‘$3$ + $8$’, one could write ‘length + width’. As...
30,430
Variable Names Description: Nikolaj has been programming for many years, but never really understood the point of writing readable code. Nikolaj’s variable names are always $c_1$, $c_2$, $c_3$, etc. Sometimes Nikolaj wants to declare a new variable called $c_ i$, but the name $c_ i$ may already be ...
30,431
Varied Amusements Description: Marika and Lisa love going to amusement parks. This time, they have their eyes set on a park with lots of exciting rides of three different types: tilt-a-whirls, roller coasters and drop towers. There are $a$ different tilt-a-whirls, $b$ roller coasters and $c$ drop tower...
30,432
Vasaloppet Description: Charlotte is watching Vasaloppet on TV. The broadcast starts at second $0$ and ends at second $T$. Unfortunately, there are also $N$ ad breaks, lasting during $N$ non-overlapping intervals of seconds between second $0$ and second $T$. Charlotte becomes very inspi...
30,433
Vase Collection Description: Mr Cheng is a collector of old Chinese porcelain, more specifically late 15th century Feng dynasty vases. The art of vase-making at this time followed very strict artistic rules. There was a limited number of accepted styles, each defined by its shape and decoration. More s...
30,434
Vauvau Description: In a nearby village, the postman, milkman and garbage man face the same problem morning after morning: house 18. House 18 is guarded by two dogs that often cause problems. What they don’t know is that the dogs’ behaviour is completely predictable. When the day starts, one dog is ag...
30,435
Veci Description: Your program will be given an integer X. Find the smallest number larger than X consisting of the same digits as X. ## Input The first line of input contains the integer $X$ ($1 \le X \le 999\, 999$). The first digit in $X$ will not be a zero. ## Output Output the result on a single line....
30,436
Vector Functions Description: Your task is to implement the following C++ functions: ``` #include "vectorfunctions.h" // Reverse a vector. // Note that it is sent as a reference, so you should // reverse the same vector that was sent in. void backwards(vector<int>& vec){ ... } // Return every other element ...
30,437
Vefþjónatjón Description: A web server needs three pieces to work: a CPU, memory and a hard drive. If one or more of these are missing, the web server won’t work. Bjarki had the idea that he could take parts from some of the servers and put them into others. For example if one webserver has a CPU and ...
30,438
Veggja Kalli Description: Kalli is quite the carpenter and has a particular penchant for walls. Today Kalli received a new project. An apartment is being built, the plans for which are given by $N$ elements. Each element denotes a cell which is either a wall, denoted by #, or an open space, denoted by .. T...
30,439
Veggspjöld Description: Hrolleifur is quite the cinephile and collects all kinds of paraphernalia related to movies. One of the things he has done is collect posters that advertise movies. He makes sure to own at least one poster for each movie, which he then glues to the wall in his room. Now Hrollei...
30,440
Veggurinn, seinni hluti Description: When Trump’s contractors have built the wall then Trump calls Maggi the painter: The wall is $N$ units wide and the units are numbered from $1$ to $N$. Maggi’s car isn’t very large and can’t hold all the paint he needs, so he will need to make several trips to the ...
30,441
Velkomin! Description: Welcome to Forritunarkeppni Framhaldsskólanna 2021. ## Input There is no input in this problem. ## Output Print a single line containing VELKOMIN! ## Scoring Group Points Constraints 1 100 No further constraints **Sample Input 1** **Sample Output 1** ``` VELKOMIN! ```
30,442
Vending Machine Description: Sleazy Bob has happened upon a vending machine. After watching enough people buy tasty snacks, Bob has realized that the vending machine is broken! Here’s what Sleazy Bob observes: * A person tries to buy a snack * The vending machine then checks to see if there are any ...
30,443
Venn Intervals Description: A Venn interval diagram is a graphical way to illustrate intersections of sets in 1D, similar to the more familiar Venn diagrams in 2D. A Venn interval diagram is defined by assigning a non-zero-length integer interval $[l_ i, u_ i)$ to each set $S_ i$. The regions w...
30,444
Verify This, Your Majesty Description: The “eight queens puzzle” is a classic puzzle where you have to place eight queens on a chess board in such a way that no queen can attack another queen. Remember that, in chess, queens can move in any direction (horizontal, vertical, and diagonal), which means th...
30,445
Very Important Edge Description: You are given a simple connected graph where each edge is assigned a non-negative weight. Recall that a minimum spanning tree of a graph is a connected, acyclic subset of the edges of the graph with minimum total weight. Find an edge which maximizes the minimum spanning...
30,446
Veður Description: As often before there is now a blue dotted weather warning in the capital area so people need to be cautious when out and about. The met office’s supercomputer blew away so people need help planning their routes. The wind forecast for the capital area can be represented by a two-dim...
30,447
Veður - Lokaðar heiðar Description: Once more a low pressure system is over Iceland. Vegagerðin contacts you to ask for help in determining which roads should be closed. To simplify things we will assume the wind speed is the same over the entire country. You are given the current wind speed, a list o...
30,448
Veður - Vegakerfi Description: Vegagerðin has contacted you again regarding another assignment. A lot of Icelanders are travelling across the country despite the bad weather. As a result Vegagerðin gets a lot of inquiries, for example, whether it’s possible to travel from Kópavogur to Egilsstaðir given...
30,449
Veður - Vindhraði Description: You’ve gotten a job at the Icelandic Met Office, working in a data management position. Your first task is to sort wind speeds into wind levels. The levels are as follows: Wind level name m/s Logn 0 - 0.2 Andvari 0.3 - 1.5 Kul 1.6 - 3.3 Gola 3.4 - 5.4 Stinningsgola 5....
30,450
Victory Through Synergy Description: He has a list of $10$ players that are on his fantasy team (no goalkeepers in this league). He also knows what country they’re from, what league they play in, and what team they play for. He doesn’t know much about soccer, but he does know these things: * If two p...
30,451
Video Speedup Description: Anthony recently started watching YouTube videos with the title “$X$ but every time $Y$ happens it speeds up by $Z$”. He likes watching these videos because it saves time, but he wonders how much time he actually saves by watching these videos (instead of the original...
30,452
Videopoker Description: Videopoker is the slot machine variant of the currently immensely popular game of poker. It is a variant on draw poker. In this game the player gets a hand consisting of five cards randomly drawn from a standard $52$-card deck. From this hand, the player may discard any number o...
30,453
Villager Trading Description: Steve is planning his retirement. He has decided to settle down in a nice town full of villagers. Of course, he doesn’t want to ever have to leave the village and go mining once he retires, so he is planning to collect every resource he’ll need now. Unfortunately, he does...
30,454
Vin Diagrams Description: Venn diagrams were invented by the great logician John Venn as a way of categorizing elements belonging to different sets. Given two sets $A$ and $B$, two overlapping circles are drawn – a circle representing the elements of $A$, and another representing the elements o...
30,455
Vinir Description: ## Input The first line of the input contains two integers $N$, the number of people present, and $Q$, the number of queries. The next $Q$ lines contain one query each. There are two kinds of queries, 1 a b signifies that Benni saw $1 \leq a \leq n$ and $1 \leq b \leq n$...
30,456
Vinnuálag Description: Knowing all you do now about the ÁFLV course you think to yourself how much effort you would have had to exert, had you worked the same amount every week of the course? That’s exactly what we’ll consider here. To clarify, same effort every week means equally many seconds are spen...
30,457
Virtual Friends Description: These days, you can do all sorts of things online. For example, you can use various websites to make virtual friends. For some people, growing their social network (their friends, their friends’ friends, their friends’ friends’ friends, and so on), has become an addictive h...
30,458
Virtual Reality Playspace Description: Yolanda just finished moving the furniture around her house. Her house is shaped like a rectangle of side lengths $r$ and $c$. Yolanda wants to choose a place to put her virtual reality (VR) playspace. Yolanda has some standards for how a VR playspace should be p...
30,459
Virus Description: Boschua is not very good at cybersecurity. Last month, he turned off the firewall because it wouldn’t let him download cat pictures. Unfortunately, this led to him getting a virus. The virus did something very strange: it added a bunch of letters to all the filenames. For example, i...
30,460
Virus Replication Description: Some viruses replicate by replacing a piece of DNA in a living cell with a piece of DNA that the virus carries with it. This makes the cell start to produce viruses identical to the original one that infected the cell. A group of biologists is interested in knowing how mu...
30,461
Virus Synthesis Description: Viruses are usually bad for your health. How about fighting them with…other viruses? In this problem, you need to find out how to synthesize such good viruses. We have prepared for you a set of strings of the letters A, G, T and C. They correspond to the DNA nucleotide sequenc...
30,462
Visitors Train Description: An aviary or a flight cage is a big cage for birds. An usual ZOO aviary typically measures tens of meters in diameter. In the aviaries, the birds can fly around and live in conditions imitating the conditions in the wild as closely as possible. At least in theory. There is o...
30,463
VisuAlgo Online Quiz Description: VisuAlgo (http://visualgo.net) is a website developed by a team of staff and students of School of Computing, National University of Singapore, the host of the 2015 ACM-ICPC Asia Singapore Regional. VisuAlgo visualizes a number of popular data structures and algorith...
30,464
Visual Python++ Description: In the recently proposed Visual Python++ programming language, a block of statements is represented as a rectangle of characters with top-left corner in row $r_1$ and column $c_1$, and bottom-right corner in row $r_2$ and column $c_2$. All characters at location...
30,465
VivoParc Description: Vivoparc is a zoological park located in Valencia. It has recently added a new area formed by a big plane savanna grassland divided into several enclosures. Our purpose is to assign one animal of the 4 different species (lions, leopards, tigers, and panthers) to each of the new V...
30,466
Viðnámsflækja Description: As per usual everything is in disarray at KFFÍ right before the contest. While others are just starting to turn up at Reykjavík University to prepare things Bjarki has already shown up and is crawling under the tables. When asked why he was doing that he said he was fixing th...
30,467
Viðsnúningur Description: ## Input One line containing $1$ to $1\, 000$ English letters and digits. ## Output Print the line after it has been reversed so Óskar can read it. Group Points Constraints 1 100 No further constraints **Sample Input 1** **Sample Output 1** ``` 2202annaloksdlahmarfinpp...
30,468
Vještica Description: Young hero adventurer Matej has, after a long and strenuous journey, arrived to his final destination – the house of evil witch Marija. In order to complete his adventure, he must solve the final puzzle the witch gives him. To even begin solving her puzzle, our hero needs to become ...
30,469
Vocabulary Description: According to a popular belief, computer programmers drink a lot of coffee and know only a few words. The vocabulary of a typical programmer consists of just three words. Besides, he rarely knows how to spell them. To help programmers with their spelling mistakes, we published a ...
30,470
Voff Description: Then suddenly Atli hears a bark, then another and then over and over. Atli finds the barking quite annoying but he always tries to make the best of a situation so he tries to turn this into a puzzle to solve. First Atli writes down the current second every time he hears a bark, denot...
30,471
Volim Description: Croatia’s national television programme is broadcasting an entertainment show titled “I Love Croatia”, modeled on the licensed format I love my country. In this show two teams of celebrities and public figures play various games which require knowledge about Croatia. One of the games...
30,472
Volume Amplification Description: You have a bunch of audio amplifiers which you have been given by your uncle, who has too much stuff lying around. An amplifier takes an audio signal as input and produces the same signal frequencies as output, but with a possibly different volume level. It multiplies ...
30,473
Vudu Description: Young Mirko has been buying voodoo dolls lately. Considering that he is very interested in the cheapest purchase possible, he has been tracking the prices of voodoo dolls each day. His price list consists of doll prices in the last $N$ days, where doll price $a_ i$ represents the ...
30,474
Vuk Description: Vjekoslav the Wolf is running away from a bunch of blood hungry hunters. The hunters are smart and hide behind trees. Vjekoslav knows this, but doesn’t know which trees. He would like to run to his comfortable, civilized cottage (as opposed to the hunters quite uncivilized den, yes I a...
30,475
WERTYU Description: A common typing error is to place the hands on the keyboard one row to the right of the correct position. So "Q" is typed as "W" and "J" is typed as "K" and so on. You are to decode a message typed in this manner. ## Input Input consists of several lines of text. Each line may con...
30,476
WFF 'N PROOF Description: WFF ’N PROOF is a logic game played with dice. Each die has six faces representing some subset of the possible symbols $K, A, N, C, E, p, q, r, s, t$. A Well-formed formula (WFF) is any string of these symbols obeying the following rules: * $p, q, r, s,$ and $t$ are W...
30,477
Waif Until Dark Description: “Waif Until Dark” is a daycare center specializing in children of households where both parents work during the day. In order to keep the little monsters …that is, darlings …occupied, the center has a set of toys that the kiddies can play with. Some of these toys belong to ...
30,478
Walk Description: Alice would like to visit Bob. However, they live in a hilly landscape, and Alice does not like to walk in hills. She has a map of the area, showing the height curves. You have to calculates the total altitude climbed, and the total altitude descended, for the route which minimizes th...
30,479
Wall Description: It’s the 14th century and construction of the Trakai Island Castle is to begin soon. The first task on the chief architect’s list is to plan the construction of the main castle wall. Building a wall that can protect the castle from any possible attack is quite tricky. To ensure the s...
30,480
Walrus Weights Description: Wallace the Weightlifting Walrus is training for a contest where it will have to lift $1\, 000$ kg. Wallace has some weight plates lying around, possibly of different weights, and its goal is to add some of the plates to a bar so that it can train with a weight as close ...
30,481
Walt Bellamy Description: Walt Bellamy holds the record for the most NBA games played in a single season. You might be wondering, “But every team plays the same number of games each year, so how can one player hold the record for most games played?” In 1968–1969, Walt played in $88$ regular-season ...
30,482
War on Weather Description: After an unprovoked hurricane attack on the south shore, Glorious Warrior has declared war on weather. The first salvo in this campaign will be a coordinated pre-emptive attack on as many tropical depressions as possible. GW reckons that the attack will neutralize the tropic...
30,483
Warehouse Description: Elvira is processing shipments for the Christmas season! There are various shipments of toys coming into her warehouse throughout the day, and her boss wants a summary report at the end. Each shipment consists of some number of a single kind of toy. The summary report is an aggr...
30,484
Warring Scoring Description: Notnomde and Yraglac have been stuck at home for months, and have taken to playing ping pong to pass the time. Usually, the player who scores the highest number of points wins, but after a while Notnomde and Yraglac got tired of using the same rules all of the time. Both pl...
30,485
Watch Later Description: While browsing YouTube videos, you commonly use the handy dandy tool that is Add Video to Watch Later. One day you finally decide that ‘Later’ has finally arrived and you have SO many videos in your list. You have a list of videos with different types. For example, some might ...
30,486
Watch Out For Those Hailstones! Description: An interesting theory in mathematics is that there is a sequence generator that, given any positive integer as the starting point, always ends with the number $1$. Although this theory has never been proven, the conjecture is known as the Collatz Conjecture ...
30,487
Watch Where You Step Description: You are an employee at the local zoo and have recently been promoted from excretory extraction to overseeing the layout of all the sidewalks throughout the property. Currently all the sidewalks are $1$-way, and the zoo is set up in various zones. Each zone is made ...
30,488
Watchdog Description: A company (name withheld) has an office building in the center of Lund. The building has a perfectly square roof with a number of hatches. Because of a series of burglaries where the perpetrators have entered through these hatches, it was decided to use a watchdog to guard the hat...
30,489
Water Description: A water company is trying to provide water from its pumping station to a mansion. The company owns $n$ water stations, numbered $1 \ldots n$, which are connected by a variety of pipes. Water can flow through both directions of a pipe, but the total amount of water that can flow t...
30,490
Water Decor Description: The Pokemon Aquarium is finally remodeling! To commemorate its $5^{th}$ year anniversary, the Aquarium has built a massive water-based decoration! The decoration is quite an interesting design and can be modeled as a series of non-overlapping circles in the square $(0, 0)$...
30,491
Water Journal Description: Every day, Eugene logs how many cups of water he drank. He forgot to log one entry in his journal though, but he remembers the minimum number and maximum number of cups of water he drank every day since he started logging his journal, and that there was at least one day where...
30,492
Watering Grass Description: $n$ sprinklers are installed in a horizontal strip of grass $l$ meters long and $w$ meters wide. Each sprinkler is installed at the horizontal center line of the strip. For each sprinkler we are given its position as the distance from the left end of the center line and its ...
30,493
Watersheds Description: Geologists sometimes divide an area of land into different regions based on where rainfall flows down to. These regions are called drainage basins. Given an elevation map (a 2-dimensional array of altitudes), label the map such that locations in the same drainage basin have the...
30,494
Waterworld Description: Thousands of planets outside the Solar System have been discovered in recent years. An important factor for potential life support is the availability of liquid water. Detecting water on faraway planets is not easy. For rotating planets, a brand-new technology using relativistic...
30,495
Weak Vertices Description: Engineers like to use triangles. It probably has something to do with how a triangle can provide a lot of structural strength. We can describe the physical structure of some designs using an undirected graph. We’ll say vertex $i$ is part of a triangle if $i$ has two diffe...
30,496
Weather Report Description: For a particular device’s location, you may assume that the weather each day is an independent random event, and you are given the predicted probabilities of the four possible weather types. Each of the $4^ n$ possible weather reports for a device must be encoded as a un...
30,497
Wedding Description: Up to thirty couples will attend a wedding feast, at which they will be seated on either side of a long table. The bride and groom sit at one end, opposite each other, and the bride wears an elaborate headdress that keeps her from seeing people on the same side as her. It is consid...
30,498
Weightlifting Description: In competitive weightlifting, you must perform a sequence of lifts. You have a constant strength $s$, and a decreasing energy reserve $e$. For each lift, you may choose any positive (not necessarily integer) weight $w$ to attempt. If $s \ge w$, the lift succeeds and y...
30,499