task
stringlengths
0
154k
__index_level_0__
int64
0
39.2k
Basic Programming 2 Description: You think you can code? This problem will test you on various basic programming techniques. You are given two integers $N$ and $t$; and then an array $A$ of $N$ integers ($0$-based indexing). Based on the value of $t$, you will perform an action on $A$. $t$ Action...
26,400
Basic Remains Description: Given a base $b$ and two non-negative base-$b$ integers $p$ and $m$, compute $p \bmod m$ and print the result as a base $b$ integer. $p \bmod m$ is defined as the smallest non-negative integer $k$ such that $p = am + k$ for some integer $a$. ## Input Input consi...
26,401
Basin City Surveillance Description: Basin City is known for her incredibly high crime rates. The police see no option but to tighten security. They want to install traffic drones at different intersections to observe who’s running on a red light. If a car runs a red light, the drone will chase and sto...
26,402
Basketball One-on-One Description: Alice and Barbara played some friendly games of one-on-one basketball after work, and you agreed to help them keep score. The rules of the game were simple: * Each successful shot by a player earns them either one or two points; * The first player to eleven points w...
26,403
Batch GCD Description: As we know, the security of the RSA problem relies on the difficulty of factoring integers. Generally, the RSA modulus is generated as follows: * Pick two large prime integers $p$ and $q$, * Compute $n = p \cdot q$. Pick two large prime integers $p$ and $q$, Compute $n = p \c...
26,404
Batmanacci Description: The Fibonacci sequence can be defined as follows: We get the sequence $1, 1, 2, 3, 5, 8, 13, 21, \ldots $. But there are many generalizations of the Fibonacci sequence. One of them is to start with other numbers, like: And we get the sequence $5, 4, 9, 13, 22, 35, 57, \ldo...
26,405
Bats! Description: Sweet Apple Acres has been infested by evil fruit-hungry bats! The Apple family has called for Twilight Sparkle’s help to get rid of them. Twilight needs to use a powerful spell to eliminate the threat the bats pose. Poring through the volumes of magic books, she found an ancient sp...
26,406
Batter Up Description: While the Chicago Cubs were ecstatic with their 2016 World Series championship, they were eliminated from the playoffs in 2017. Looking ahead to 2018 they are beginning to embrace the more data-driven analysis of player’s values known as Sabermetrics. For example, a player’s bat...
26,407
Battle Simulation Description: A terrible monster is rampaging through Neo Tokyo 5! The Earth Defense Force (EDF) has sent a mech unit1 to defeat the monster. Because there is only a single mech unit available after previous monster rampages, the EDF has decided to simulate the upcoming battle between ...
26,408
Battle of Hogwarts Description: The enemies are coming to Hogwarts School of Witchcraft and Wizardry. Please help Harry and his friends defend the school! Hogwarts can be viewed as a grid with $r$ rows and $c$ columns. The rows are numbered from $1$ to $r$ from top to bottom, and the columns are numbe...
26,409
Battle of Pokenom Description: In order to become the very best Pokenom trainer, Bash - the Pokenom trainer - must first understand the Pokenom battle rules. A Pokenom battle between two Pokenom trainers $A$ and $B$ goes as follow: First, each Pokenom trainer must choose one Pokenom. For simplicity, let’s...
26,410
Battleship Description: When playing battleship, players take turns trying to sink the other players navy. Each player may take shots at one coordinate at once. If he hits one of his enemy’s ships and the enemy has any other ships left, he may continue. Else, the other player may take shots. After hitt...
26,411
Baza Description: The longest common prefix of two words is the longest word that both words start with. For example, the longest common prefix of the words “identity” and “idealistic” is the word “ide”. A database contains $N$ words. The algorithm to search for a query word $W$ in the database is primiti...
26,412
Bazaar Description: In an epic but tiny pirate game, several players compete for resources in order to gain a large enough booty to bury at deserted islands. After pillaging resources from peaceful settlements, players need to visit the bazaar in order to exchange their goods for pieces o’ eight to add...
26,413
Bazen Description: Mirko and Slavko have built a grand new pool in front of their weekend getaway. The pool is an isosceles right triangle, with legs of length 250. Everything was perfect, girls were coming, the DJ was coming, and the parties were wild. But, a problem arose when they started serving f...
26,414
Beacons Description: In ancient times, communication was not as swift as it is today. When a kingdom was at war, it could take months to muster all the armed forces. But by using fire-lit beacons at strategic locations, it was still possible to quickly send emergency signals. When the first beacon is ...
26,415
Beaking spackwards Description: The Danish communication robots KA-1 and Androia love beaking spackwards: They switch parts of words and are endlessly amused by the results. For instance, the word “sodavand” becomes “vodasand” and “vaskeklud” becomes “klaskevud.” The rule is that string $x$ is said to...
26,416
Bearly Made It Description: Barney the polar has wandered off on an adventure. Lost in thought, he suddenly realizes he has strayed too far from his mother and is stuck on an ice shelf. He can still see her in the distance, but the only way back is by crossing a group of other ice shelves, all of which...
26,417
Beast Bullies Description: There are some animals with distinct strength levels getting water from a watering hole. The more animals that are at the watering hole the less water each animal will get. For this reason some of the animals will try to force the others to leave. Periodically the weakest an...
26,418
Beat the Spread! Description: Superbowl Sunday is nearly here. In order to pass the time waiting for the half-time commercials and wardrobe malfunctions, the local hackers have organized a betting pool on the game. Members place their bets on the sum of the two final scores, or on the absolute differen...
26,419
Beautiful Bridges Description: The company Arch Bridges Construction (ABC) specializes in—you guessed it—the construction of arch bridges. This classical style of bridge is supported by pillars that extend from the ground below the bridge. Arches between pillars distribute the bridge’s weight onto the ...
26,420
Beautiful Primes Description: John Nash is a talented mathematician at Princeton. Due to his prolific contributions in academia, he was even recruited to the Pentagon at a young age to crack enemy encrypted telecommunication. In his first task, John was able to decipher the code mentally, much to the a...
26,421
Beautiful Square Description: Harry loves drawing. Harry also loves squares. Today, Harry is going to draw a square. Harry’s square can be divided into $n \cdot n$ unit squares. Let’s number the rows from $1$ to $n$ from top to bottom. Similarly, let’s number the columns from $1$ to $n$, from left to ...
26,422
Beavergnaw Description: When chomping a tree the beaver cuts a very specific shape out of the tree trunk. What is left in the tree trunk looks like two frustums of a cone joined by a cylinder with the diameter the same as its height. A very curious beaver tries not to demolish a tree but rather sort ou...
26,423
Bee House Perimeter Description: Alice is a queen bee living in Beeland (a honeycomb structure described by $R$, the number of cells of the side of honeycomb). The cells in Beeland are numbered from $1$ to $R^3 - (R-1)^3$ in row major order. For example for $R = 3$, the Beeland that Alice lives in ...
26,424
Bee Problem Description: You are a busy little bee, and you have a problem. After collecting nectar all day long, you are returning to the beehive with a large supply of honey. You would really like to take a nap now, but sadly, you have to store all the honey in your beehive first. Opening up a cell i...
26,425
Beehives Description: Bill’s hives all exist on a plane, and he knows some distance d such that two hives within $d$ of each other will fight, and both will produce sour honey. If a hive does not fight with any other hives, it produces sweet honey. Given $d$ and the positions of $N$ beehives, output how ma...
26,426
Beehives Description: Bees are one of the most industrious insects. Since they collect nectar and pollen from flowers, they have to rely on the trees in the forest. For simplicity they numbered the $n$ trees from $0$ to $n - 1$. Instead of roaming around all over the forest, they use a particular l...
26,427
Beekeeper Description: Bill’s affinity for a word is determined by how many pairs of double vowels it has, where vowels are the letters {a,e,i,o,u,y}. Given a list of words, find the word that has the most pairs of double vowels, as it will be Bill’s favorite word. Notes: * It is guaranteed that ther...
26,428
Beep Code Description: Aecepece is having computer problems. Their computer will not turn on, and is producing a beeping sound which is supposed to help diagnose the issue, but they cannot seem to analyze it by ear. Your task is to analyze a recording of this beeping sound to determine what the problem...
26,429
Beetle Description: A beetle finds itself on a thin horizontal branch. “Here I am on a thin horizontal branch,” thinks the beetle, “I feel pretty much like on an x-axis!”. It surely is a beetle of deep mathematical thought. There are also $n$ drops of dew on that same branch, each holding $m$ units of...
26,430
Befunge Description: Befunge is a two-dimensional, stack-based, self-modifying programming language, described as a cross between Forth and Lemmings. It was created in 1993 by Chris Pressey. A Befunge program is written on a $25\times 80$ torus of characters; control flow is choreographed by follow...
26,431
Begin The Offensive Description: Miku Nakano is smitten over her tutor Fuutaro Uesugi. However, she knows competition is stiff. The other $4$ quintuplets have begun scheming elaborate plans in order to win over Fuu-kun’s heart. Despite the odds, Miku wants to remain true to herself. Miku recently has been ...
26,432
Being Solarly Systematic Description: Professor Braino Mars is one of the top researchers in the field of solar system creation. He runs various simulations to test out his theories on planet formation, but he’s old school and all of these simulations are done by hand. It’s time for Braino to enter the...
26,433
Bela Description: Young Mirko is a smart, but mischievous boy who often wanders around parks looking for new ideas. This time he’s come across pensioners playing the card game Belote. They’ve invited him to help them determine the total number of points in a game. Each card can be uniquely determined ...
26,434
Bell Ringing Description: Method ringing is used to ring bells in churches, particularly in England. Suppose there are $6$ bells that have $6$ different pitches. We assign the number $1$ to the bell highest in pitch, $2$ to the second highest, and so on. When the $6$ bells are rung in some order—each ...
26,435
Bendilfærslur Description: Níels is very forgetful and has a lot of domains. When he was setting up his website he forgot what domain the site had, but thankfully he had written down the IP address that the website was on. Now Níels needs to use the IP address to look up the domain so he can share the ...
26,436
BergMál Description: Now all the world’s programmers are trying to figure out how you program in BergMál, so they have worked together to put a keylogger on Bergur’s computer. The keylogger then sends back what keys Bergur presses and in what order. Can you take the info that the keylogger sent and rew...
26,437
Bergur Description: Bergur has decided to go to a Hot Yoga class to burn some fat. Bergur doesn’t think it’s good enough to just regularly attend Hot Yoga classes, he wants to always stay at least as long as he did the previous day. That is to say, Bergur intends to show up for Hot Yoga every day for t...
26,438
Berry Battle Description: Berry picking is hard work, but also a peaceful and relaxing experience. After a long day of picking, it is common to see nothing but berries once you close your eyes to sleep. As your mind drifts into unconciousness, the berries will start living their own life and create all...
26,439
Berry Battle 2 Description: Erik and his grandpa often go to the forest to pick blueberries. Grandpa always finds the most berries, and even though it is not a competition, Erik has had enough of this. He has observed that grandpa uses a simple greedy strategy to pick as many berries as possible. With ...
26,440
Best Before Description: Given a possibly ambiguous date “$A/B/C$”, where $A, B, C$ are integers between $0$ and $2999$, output the earliest possible legal date between Jan 1, 2000 and Dec 31, 2999 (inclusive) using them as day, month and year (but not necessarily in that order). Recall that a year is...
26,441
Best Compression Ever Description: Being educated in Computer Science and Mathematics is not always easy. Especially not if you have “friends” who repeatedly insist on showing you their new “proofs” that P equals NP, that the Riemann Hypothesis is true, and so on. One of your friends recently claims to ha...
26,442
Best Compromise Description: There is a saying “a good compromise makes no one happy”. As distressing as that may be, I guess most people still think it is a good idea to seek the best agreement. The problem though, is to define the measure in which the word “best” gets a meaning. Let us consider $n$ p...
26,443
Best Investing Description: Geraldine has designed a fantastic investment portfolio that is guaranteed to grow at $r\% $ every year, and she wants to maximize how much she can get out of it. Starting now and for the next $y$ years, she can either deposit money into or withdraw money from her account (b...
26,444
Best Rational Approximation Description: Many microcontrollers have no floating point unit but do have a (reasonably) fast integer divide unit. In these cases it may pay to use rational values to approximate floating point constants. For instance, is a quite good approximation to A best rational approxim...
26,445
Best Relay Team Description: As the name of the event implies, such a sprint relay consist of $4$ legs, $100$ meters each. One would think that the best team would simply consist of the $4$ fastest $100$ m runners in the nation, but there is an important detail to take into account: flying star...
26,446
Besta gjöfin Description: Sigrún got a lot of presents from all the guests that attended her birthday party today. She has opened all the gifts and noticed that they weren’t equally fun. She made a list of all the gifts she got, from whom she got each gift and a number denoting how much she enjoyed the gi...
26,447
Better Productivity Description: ACME Inc. is reorganizing their factory, in order to maximize their productivity of useless trinkets. The new factory design consists of $p$ independent and identical production lines. Each production line can be assigned some number of workers. The actual work is of c...
26,448
Betting Description: The popular streaming platform switch.tv just unveiled their newest feature: switch betting. Streamers can now get their viewers to bet on two different options using switch points (patented). Each viewer bets some number of switch points for one of the two options. The total amou...
26,449
Between Dark and Dawn Description: Princess Celestia and Princess Luna will soon be abdicating the throne to allow for the formal succession of their protégée Princess Twilight Sparkle. In the transition, they have decided to go on vacation, giving Twilight some experience in managing the matters of th...
26,450
Biased Standings Description: Usually, results of competitions are based on the scores of participants. However, we are planning a change for the next year of IPSC. During the registration each team will be able to enter a single positive integer – their preferred place in the ranklist. We would take a...
26,451
Bicikli Description: A bicycle race is being organized in a land far, far away. There are $N$ towns in the land, numbered $1$ through $N$. There are also $M$ one-way roads between the towns. The race will start in town $1$ and end in town $2$. How many different ways can the route be set? Two rout...
26,452
Bidirectional Code Description: For communication through space between earth and satellites, one cannot simply transmit a message in the same way as cellular communication like 4G. Because of the extremely long distance a signal travels, the message might be distorted by noise. Throughout the years, ...
26,453
Big And Description: You are building a boolean circuit and need to compute the logical AND of a collection of source signals. The problem is that you only have access to a collection of identical AND gates that take two boolean inputs (i.e. True or False) and outputs a single boolean value that is...
26,454
Big Boxes Description: Brandon Greg Jr. is moving to the United States to double his salary. He has $n$ items that he needs to pack into $k$ big boxes. The $n$ items are currently arranged in a row, and Brandon doesn’t want to bother reordering them, so he will partition the $n$ items into $k$ grou...
26,455
Big Brother Description: A good CCTV camera is expensive, so ideally you would only use one. It would obviously have to be placed somewhere where the entire office floor can be overlooked, so there are no walls blocking some dark corner of the floor where your workforce might hide. While looking at th...
26,456
Big Data Description: Today everyone is talking about big data. As a renowned data provider in the area, you now have $N$ precious pieces of data. You want to sell all $N$ pieces of data to $N$ customers. You can sell multiple pieces of data (including all and none) to a single customer. However, e...
26,457
Big Factoring Description: You are given a positive integer $n$ and should print the prime factors of $n$. ## Input The first and only line of input contains a positive integer $2 \leq n \leq 10^{24}$. ## Output Print the prime factors of $n$ in ascending order. If a prime factor occurs multiple ti...
26,458
Big Integers Description: Nick is preparing a problem for a programming contest about comparing big integers. He has decided on the input format for the integers: They will be expressed in base 62, with $0$ through $9$ representing digit values $0$ through $9$, lowercase letters a through z represe...
26,459
Big Totoro Description: Big Totoro is currently eating big acorns. There are $N$ big acorns, each with some size $s_i$. Big Totoro starts off at size $K$. After eating a big acorn, Big Totoro adds the size of that big acorn onto his current size. However, Big Totoro can only eat a big acorn if the big...
26,460
Big Truck Description: Your boss has hired you to drive a big truck, transporting items between two locations in a city. You’re given a description of the city, with locations of interest and the lengths of roads between them. Your boss requires that you take a shortest path between the starting and en...
26,461
Biggest Slice Description: You are sharing a large, circular pizza with $n-1$ of your friends. Your technique for slicing the pizza is shown in Figure 1; you rotate the pizza clockwise about its center by angle $\theta $, and then you make a slice from the center of the pizza straight to the right. You rep...
26,462
Bijele Description: Mirko has found an old chessboard and a set of pieces in his attic. Unfortunately, the set contains only white pieces, and apparently an incorrect number of them. A set of pieces should contain: * One king * One queen * Two rooks * Two bishops * Two knights * Eight pawns One king...
26,463
Bike Gears Description: Many multi-gear (multi-speed) bicycles have a drivetrain mechanism that is structured as follows: the pedals are attached to a front set of sprockets (toothed wheels), which is connected by a chain to a back set of sprockets, which in turn is attached to the rear wheel. The chai...
26,464
Bike Parking Description: Sanne recently conceived a lucrative business idea: renting out premium bike parking at the Eindhoven train station. To maximize her profits, she divided the bike parking slots into $N$ different tiers, numbered from $0$ to $N-1$. Tier 0, the premium tier, is located v...
26,465
Bikes and Barricades Description: Scott wants to ride his bike along a straight road. But the road has some barricades! Scott will ride his bike up to the first barricade and stop. Model Scott’s straight road as the positive $Y$ axis, with Scott starting at the origin. The barricades are line segments, sp...
26,466
Bikes vs Cars Description: In Lund, biking is a very common method of transportation. But it is sometimes difficult to fit both cars and cyclists on the narrow streets. To improve the situation, the local governor wants to completely redesign the local street network. There are $N$ important locat...
26,467
Biking Duck Description: Duckburg has recently started providing a very eco-friendly way of public transport: bikes. At many bike stations throughout the city, one can pick up a free bike, ride it to another bike station, and drop it there. This gives Gladstone two ways of transportion: on foot or by b...
26,468
Bilateral Projects Description: However, money is tight and a new policy has been created: the CEO wants at least one person from each project, and additionally, she wants to invite as few people as possible. This is where you come in. In order to help your friend get a ticket to Barbados, you are to w...
26,469
Bilað Lyklaborð Description: Sigurjón’s keyboard stopped working the other day when he accidentally spilled soda all over it. After this the keyboard has started, likely as an act of revenge, to sometimes type a character multiple times when Sigurjón presses a key. Sigurjón is furious over his keyboard...
26,470
Billboards Description: There are $n$ wonderful sponsors in total, so to be fair, we would like to give each of them $1/n$ of the total area of the billboard. However, this is complicated by the fact that each marvelous sponsor potentially values sections of the billboard differently. For example, ...
26,471
Billiard Description: In a billiard table with horizontal side $a$ inches and vertical side $b$ inches, a ball is launched from the middle of the table. After $s > 0$ seconds the ball returns to the point from which it was launched, after having made $m$ bounces off the vertical sides and $n$ b...
26,472
Binary Choosing Description: Two years have passed, and Binary Town is having its next round of biennial elections.1 The “binary voting” system from last time confused a lot of people, so the citizens have decided to not vote at all this year and instead choose one citizen uniformly at random to become...
26,473
Binary Exponentiation Description: You are given non-negative integers $a, e, m$ and should print $a^e \pmod{m}$. ## Input The first and only line of input contains non-negative integers $a, e, m \leq 10^{18}$ separated by a space. We also have $m \geq 2$. ## Output Print $a^e \pmod{m}$. **Sample ...
26,474
Binary Heap Description: Your task is to implement a binary max-heap (http://en.wikipedia.org/wiki/Binary_heap) in C++. Your heap should have the time complexities $O(\log n)$ for the insert and remove operations, and $O(1)$ for the size and maximum operations. ## Template You can download the templ...
26,475
Binary Search Description: You are given an undirected graph with $n$ vertices and $m$ edges. Each vertex $v$ has a number $a_v$ written on it. This number is either $0$ or $1$. A walk is a sequence $v_1v_2 \dots v_k$ of vertices in the graph such that any two consecutive vertices are connected by an e...
26,476
Binary Tree Description: A Binary Tree is a tree data structure where each node has at most two children, distinguished as left and right child, and the node having the children is called the parent of those children. An instruction string is a string consisting of the letters L, R and U. L stands...
26,477
Binary Voting Description: Binary Town is holding its biennial elections. All $k$ positions on its council are open, and as usual Notnomde and Yraglac are the only ones running for each position. Having long since abandoned quaint majority voting, Binary Town uses binary voting instead. In binary voti...
26,478
Binary search tree Description: A binary search tree is a tree in which every node has at most two children nodes (a left and a right child). Each node has an integer written inside it. If the number $X$ is written inside a node, then the numbers in its left subtree are less than $X$ and the numbers in its...
26,479
Bing It On Description: Bing wants to showcase its clear superiority over Alphabet’s lesser known search engine in the great bing-it challenge of 2016. In order to do this, they have pulled out all the stops and decided to hire the very best of the best of Norwegian engineers to do the work for them. B...
26,480
Bingo Ties Description: Bingo is a game of chance played by a group of players. Each player has his or her own bingo card with a $5$-by-$5$ grid of numbers. Each number appears at most once per card. The bingo caller calls out a sequence of randomly drawn numbers, and the players mark the numbers that ...
26,481
Bingo for the Win! Description: Bingo is a game of chance for multiple players. Each player receives a sheet with some numbers, and a game master then calls out these numbers in a random order. Players cross off the numbers that they have heard, and the first player to cross off all their numbers wins ...
26,482
Bio Trip Description: Ollie MacDonald is in charge of a biological reserve used to study the nesting habits of birds. Scattered throughout the reserve are various types of nesting boxes, and one of Ollie’s tasks is to regularly check on the boxes. The only way to travel between the boxes is via a set o...
26,483
Biometrics Description: A simple biometric system translates a human image into a polygon by considering certain features (eyes, nose, ears, etc.) to be vertices and connecting them with line segments. The polygon has distinct vertices but may be degenerate in that the line segments could intersect. Be...
26,484
Bipartite Battle Description: A Bipartite Graph is an undirected graph whose vertices can be partitioned into $2$ sets such that, for each edge $(u, v)$, $u$ and $v$ belong to different sets. Socket has challenged Bash to a Bipartite Battle. In the Bipartite Battle, Bash and Socket play a game with Bipart...
26,485
Bird Rescue Description: Polly the Parrot is sitting at the top of her favorite tree in Manhattan. In Manhattan, the roads are either avenues; going north to south, or streets; going east to west. The avenues are numbered $0$, $1$, $2$, and so on, from east to west, with avenue $0$ being the easter...
26,486
Birds on a Wire Description: There is a long electrical wire of length $\ell $ centimetres between two poles where birds like to sit. After a long day at work you like to watch the birds on the wire from your balcony. Some time ago you noticed that they don’t like to sit closer than $d$ centimetres fro...
26,487
Birthday Boy Description: Bobby has just joined a new company, and human resources has asked him to note his birthday on the office calendar. Bobby the Birthday Boy wants to feel special! Also, Bobby the Birthday Boy does not mind lying for attention. He notices that the longer people have not celebrated ...
26,488
Birthday Cake Description: On his birthday, John’s parents made him a huge birthday cake! Everyone had a wonderful dinner, and now it’s time to eat the cake. There are $n$ candles on the cake. John wants to divide the cake into $n$ pieces so that each piece has exactly one candle on it, and there a...
26,489
Birthday Candles Description: Minka the Martian is celebrating their birthday with many friends. Similar to Earth birthdays, the occasion is commemorated by blowing candles out on a cake. However, on Mars the candles are placed on the cake differently: each of the $N$ guests attending the party wil...
26,490
Birthday Gift Description: It’s your Venusian friend’s birthday. You don’t remember their exact age, but you are sure it had to be no more than $10^{18}$ years. You will give them a decimal number (without leading zeros) for their birthday. You want the number of digits to be equal to their age. To...
26,491
Birthday Memorization Description: Krarkl wants to learn the birthdays of all his $N$ friends, so he knows whom to congratulate each day. Unfortunately collisions sometimes arise, meaning several friends may have the same birthday. This may confuse Krarkl, so he decided to only remember the birthday of...
26,492
Birthday Paradox Description: The Birthday Paradox is the name given to the surprising fact that if there are just $23$ people in a group, there is a greater than $50\% $ chance that a pair of them share the same birthday. The underlying assumptions for this are that all birthdays are equally likel...
26,493
Birthday Party Description: Consider this example: James has three friends: Lucy, Sue, and Mark. James is friends with all three of them, but unfortunately he doesn’t have Mark’s phone number so he can’t invite him directly. However, Sue has Mark’s number (and vice versa) so she can invite Mark to Jame...
26,494
Bishops Description: Yesterday was Sam’s birthday. The most interesting gift was definitely the chessboard. Sam quickly learned the rules of chess and defeated his father, all his friends, his little sister, and now no one wants to play with him any more. So he decided to play with another birthday gift –...
26,495
Bit 4 Bit Description: The two robots ZF3 and XG2 are the hosts of the music show Bit 4 Bit. On the show, they play all kinds of songs, from the famous Chips Ahoy Matey to the lesser known ones, like The Funky Algorithm. Now, they only need some playlists for the next season! ZF3 and XG2 start out wit...
26,496
Bit Game Description: Alice and Bob play the following game. First, their mother picks a subset of non-negative integers less than $2^{20}$. Alice then writes down either $0$ or $1$ on a piece of paper. Starting with Alice, they now alternate appending either $0$ or $1$ to the number currently on the p...
26,497
Bit by Bit Description: A brand new Ultra-CISC microprocessor has a collection of instructions for manipulating individual bits of one of its 32-bit registers. The instructions work as described in the following table. In all cases, bit zero is the low-order bit and bit 31 is the high-order bit. The re...
26,498
Bitaflipp Description: A Turing machine consists of two main parts. Firstly there is a tape divided into small cells, which are numbered in increasing order from $1$. On each cell there is either a $0$ or a $1$. Above this tape here is a head. This head is over one cell at a time, but it can move back ...
26,499