task
stringlengths
0
154k
__index_level_0__
int64
0
39.2k
Tic-Tac State Description: Congratulations! You are starting your internship for the famous digital archaeologist, Endiana Jones. You have been assigned to evaluate the results of saved games of a 1980’s version of Tic-Tac-Toe. In those days, programmers had very little storage, so they saved game stat...
30,200
Ticket Completed? Description: Many are familiar with the board game Ticket To Ride1 where players compete to build a railway empire, claiming routes between cities. The game consists of a map of cities and various rail segments each connecting two adjacent cities. A key way to score points towards winnin...
30,201
Ticket Draw Description: The concert promoters of the Bon Jovi Tour 2013 have decided to sell tickets for the concerts in lotteries. The rules are quite simple. For every concert, fans can apply online for tickets. In response they receive unique reservation numbers. It is important that for each conce...
30,202
Ticket Lottery Description: The lottery operates as follows. First, everyone interested enters the lottery. Then, $n$ lucky winners are drawn, and each of these is offered to buy up to $t$ tickets. Given the number of people $p$ in your group (all of which entered the lottery) and the total number of peop...
30,203
Ticket to Ride Description: An assignment consists of a pair of cities that are to be connected by a series of shorter railway routes. A route can be claimed (for a certain cost associated with the route), but things are complicated by the fact that there is only a limited number of routes, and once a ...
30,204
Tide Goes In, Tide Goes Out Description: You are kayaking through a system of underground caves and suddenly realize that the tide is coming in and you are trapped! Luckily, you have a map of the cave system. You are stuck until the tide starts going out, so you will be here for a while. In the meantim...
30,205
Tight words Description: Given is an alphabet $\{ 0, 1, \dots , k\} , 0 \leq k\leq 9$. We say that a word of length $n$ over this alphabet is tight if any two neighbour digits in the word do not differ by more than 1. For example if $k=2$, we may only use digits $0, 1, 2$. These are the tight ...
30,206
Tight-Fit Sudoku Description: At some point or another, most computer science students have written a standard Sudoku solving program. In a standard Sudoku puzzle, a $9 \times 9$ grid that is partially filled in with digits is given. The task is to complete the grid so that each digit occurs exactl...
30,207
Tightly Packed Description: Consider packing widgets for shipping where widgets cannot be stacked upon each other (2D packing). Each widget has a $1\times ~ l$ footprint and is $1$ unit high. Boxes are available in any $W$ by $H$ by $1$ size such that $H/2 \leq W \leq 2H$, with $W$ and $H$ being integ...
30,208
Til hamingju Description: ## Input There is no input in this problem. ## Output Print a single line containing TIL HAMINGJU MED AFMAELID FORRITUNARKEPPNI FRAMHALDSSKOLANNA! ## Scoring Group Points Constraints 1 100 No further constraints **Sample Input 1** **Sample Output 1** ``` TIL HAMINGJU MED ...
30,209
Tildes Description: The other day Bjarki was playing one of his many video games, $\sim $s. In $\sim $s you build a house, start a family, and slowly, but surely, gain riches and fame. One particular day in the game there was a $30$ year anniversary party and Bjarki’s characters invited all the...
30,210
Tile Cutting Description: * The rectangular tile to be cut must be positioned in the bottom left corner of the cutting surface and the edges must be aligned with the grid lines. * The cutting blade can cut along any line connecting two different grid points on the tile boundary as long as the ...
30,211
Tiles Description: Soon after converting to Christianity, it is believed that the first and the only Lithuanian King Mindaugas ordered the construction of the Vilnius Cathedral. The construction is almost completed, except that the floor has to be covered with ceramic ornamented glazed tiles. The floo...
30,212
Tilting Tiles Description: You found a weird puzzle in a box with old toys in your attic. The puzzle forms a rectangular grid board made of $h \times w$ square cells. Some cells in that grid have a colored tile placed on them, as shown in Figure 1. You are not yet sure what the exact goal of this puzz...
30,213
Tima goes to Xentopia Description: The city of Xentopia has a well-connected railway network. The city has $N$ junctions numbered from $1$ to $N$. There are $M$ pairs of railway tracks that exist between the junctions. Trains can travel in both directions on each track. Each railway track is la...
30,214
Time Travelling Temperatures Description: Hello from the future. I am a time traveller. You would think that in the future we have agreed to use a single scale for measuring temperature. This is not so. In fact, we have all sorts of scales now. All the big brands have made their own. This is a bit conf...
30,215
Time Zones Description: Prior to the late nineteenth century, time keeping was a purely local phenomenon. Each town would set their clocks to noon when the sun reached its zenith each day. A clockmaker or town clock would be the “official” time and the citizens would set their pocket watches and clocks...
30,216
Timebomb Description: You and your teammates from the anti-bomb squad of the local police have been called to defuse a bomb found in the only pub in town. Fearing the tragic consequences this might produce, you go to the scene as quickly as possible. After some research, you learn that the bad guys hav...
30,217
Timing Description: A clash of galaxies is coming! A galaxy ruled by the mysterious MdI is trying to annex our milky way, but the galactical government has plans to turn things round. Our intelligence agency has infiltrated the enemy’s headquarter and gained surprising intelligence. The enemy is movi...
30,218
Tip of Your Tongue Description: Has this scenario ever happened to you? You’re having a lovely conversation with someone, begin to say a word you’ve used hundreds of times, and the word escapes your mind, leaving you sputtering the first syllable. Well worry no more, because the Institute for Cancellin...
30,219
Tired Terry Description: Terry is feeling tired and he suspects it is because of a lack of sleep. He created a device that records his sleeping pattern over a period of time measured in seconds. Assuming that the recorded sleeping pattern keeps repeating, help Terry by letting him know how often he is tir...
30,220
Title Cost Description: You are head of operations at FlixNet, and you are responsible for transmitting just the title of movies to consumers. All movie titles on FlixNet are a single word and consist only of alphabetic characters. The aggregate cost for transmitting a particular title is just equal t...
30,221
ToLower Description: Anthony is participating in a programming contest today! He’s excellent at algorithms; he can design and implement the solution to even the hardest problems in the programming contest in minutes. Unfortunately, parsing inputs is his greatest weakness. Specifically, he really strugg...
30,222
Toads Description: There are $N$ Toads in the Mushroom Kingdom, and they have been tasked with building a network of pipes between their houses to facilitate quick travel throughout the kingdom. Each Toad $i$ (numbered from $1$ to $N$) chooses another Toad $j \neq i$ and builds a pipe connecting their ...
30,223
Toast Description: ## Input A single line containing three integers, $N$, $D$, and $T$. We always have $2 \leq N \leq 10^4$, $100 \leq D \leq 10^9$ and $1 \leq T \leq 10^{8}$. ## Output Output should contain two numbers $\ell $ and $h$, the lowest and highest possible radius of the table. Your answ...
30,224
Toggi Description: Toggi loves the number $\pi $. Toggi quite likes making his computer calulate $\pi $ but that can take quite a long time, depends a bit on the number of digits he wants to calculate. If he calculates the first $n$ digits of $\pi $ it takes $n \log _{10}(n) / 10^6$ seconds, where ...
30,225
Toilet Seat Description: Many potential conflicts lurk in the workplace and one of the most sensitive issues involves toilet seats. Should you leave the seat “up” or “down”? This also affects productivity, particularly at large companies. Hours each week are lost when employees need to adjust toilet se...
30,226
Tok Tik Description: Tok Tik is a new app that youngsters are absolutely raving over. There they compete to get the most views. You have found yourself in a discussion with your friend on who is truly the most popular Tok Tikker of all time. You decide to define the most popular Tok Tikker of all time ...
30,227
Token Game Description: Alice and Bob are playing a game on board which is a 2-dimensional $300 \times 300$ grid. The board is subdivided into cells. Each cell can be uniquely identified by two integers representing $(x,y)$ coordinates, each in the range from $1$ to $300$. Two tokens are on th...
30,228
Toll Description: A trucking company wants to optimize its internal processes—which mainly means saving money. The company serves a region where a toll must be paid for every single street. Each street connects two places (cities, villages etc.) directly. The company serves a set of orders; each order ...
30,229
Toll Roads Description: Your state has a number of cities, and the cities are connected by roads. Unfortunately, all of the roads are toll roads! You now run the local chapter of AAA (American Automobile Association), and people are constantly asking you about the tolls. In particular, they’ve been as...
30,230
Tom and Jerry Description: Jerry the Mouse has finally tired of being chased by Tom the Cat, and has decided to strike back. He has secretly constructed a catapult in the lower right cell of the rectangular grid representing the living room. It is now time to fire the catapult.1 However, Jerry’s cu...
30,231
TomTom Cruise Description: You intend to take a trip from your base to Ganymede. You have a spaceship which you will use for the whole trip. It will take some fuel to get there, some fuel to traverse part of the moon, and some fuel to get back to the base. There are some points on Ganymede you can visit. ...
30,232
Tomb Hater Description: You’ve discovered the long-lost tomb of the great pharaoh T’om Bha Ter. After eluding a devious sequence of snake traps, boulder traps, ant traps, sand traps and speed traps, you’ve about had it with traps. Only one challenge remains between you and a hoard of priceless, museum-...
30,233
Tomb Raider Description: Hu the Tomb Raider has entered a new tomb! It is full of gargoyles, mirrors, and obstacles. There is a door, with treasure beyond. Hu must unlock the door guarding the treasure. On that door is written, in an ancient tongue, the secret to opening the door: This means that the ...
30,234
Tomography Description: Binary tomography deals with the problem of reconstructing binary images from a small number of projections. One of its most basic problems is to construct a binary ($\{ 0,1\} $-valued) matrix with given row and column sums. This is not always possible and your task is to determ...
30,235
Tomosynthesis Description: Tomosynthesis is a medical imaging modality in which a 3D dataset is obtained algorithmically from a set of X-ray images taken in different directions within a limited range of angles. A larger range of angles normally gives a better reconstruction, but is more difficult to a...
30,236
Tone Banks Description: On Mars, the greatest Earth music hits of all time are stored in huge physical databases of records. This will allow current and future Mars inhabitants to remind themselves of the culture of the motherland, should they grow homesick. These databases are called Tone Banks, as th...
30,237
Topographic Isolation Description: As a mountaineer, you are interested in the most impressive mountains. One way of comparing mountains against each other is their topographic isolation. The topographic isolation of a mountain is the minimal horizontal distance you would have to travel from the peak t...
30,238
Topovi Description: Mirko is a huge fan of chess and programming, but typical chess soon became boring for him, so he started having fun with rook pieces. He found a chessboard with $N$ rows and $N$ columns and placed $K$ rooks on it. Mirko’s game is made of the following rules: * Each rook’s power is de...
30,239
Torn To Pieces Description: You have arrived in The Big City but your journey is not yet complete. You must still navigate the subway and get to your final destination. The information booth in the subway station is unattended and fresh out of maps of the subway system. On the floor you notice fragment...
30,240
Torrent Routing Description: John is trying to download a file using torrent. Torrent works by storing data in a network of users that upload and download bits of data from each other. To download the file John wants, he needs to connect to several users and download the bits of data necessary to compl...
30,241
Touchdown! Description: In a game of American Football, there are several factors to take into consideration when detailing the rules of the game. The goal of the game is to move the football across the field into the endzone of the defending team through a series of plays, which form a drive. In each ...
30,242
Touchscreen Keyboard Description: Nowadays, people do not use hardware keyboards but touchscreens. Usually, they touch on the wrong letters with their chunky fingers, because screen space is precious and the letters therefore too small. Usually, a spell checker runs after typing a word and suggests ot...
30,243
Tour Guide Description: You are working as a guide on a tour bus for retired people, and today you have taken your regular Nordic seniors to The Gate of Heavenly Peace. You let them have a lunch break where they could do whatever they like. Now you have to get them back to the bus, but they are all wal...
30,244
Tour de France Description: A racing bicycle is driven by a chain connecting two sprockets. Sprockets are grouped into two clusters: the front cluster (typically consisting of 2 or 3 sprockets) and the rear cluster (typically consisting of between 5 and 10 sprockets). At any time the chain connects one...
30,245
Tour de France Description: Your company has gotten a grand and prestigious contract: you are to write a program for the organisation of the Tour de France! With the large amount of money that the organisation of the Tour has, your marketing department became really fanatic, trying everything to get so...
30,246
Tourist Description: A lazy tourist wants to visit as many interesting locations in a city as possible without going one step further than necessary. Starting from his hotel, located in the north-west corner of city, he intends to take a walk to the south-east corner of the city and then walk back. Whe...
30,247
Tourists Description: In Tree City, there are $n$ tourist attractions uniquely labeled $1$ to $n$. The attractions are connected by a set of $n-1$ bidirectional roads in such a way that a tourist can get from any attraction to any other using some path of roads. You are a member of the Tree City p...
30,248
Tournament Description: The tournament schedule is organized so that no knight needs to compete in more than $e$ events to be champion, for the minimum possible $e$ given $k$, the number of knights. In order to construct the schedule, it may be necessary to identify several knights who compete in f...
30,249
Tournament Matchmaking Description: You are organizing a recreational rugby tournament. A rugby team has $15$ distinct roles, numbered $1$ to $15$. Each team in the tournament must have exactly $15$ players, each fulfilling one of the roles. Although several groups of friends showed up to play ...
30,250
Tournament Seeding Description: You are tasked with seeding a single-elimination tournament for a one-on-one game. The number of players who have registered for the tournament is exactly a power of two, and there will be exactly enough rounds in this tournament to decide a winner. Furthermore, each pla...
30,251
Tours Description: The Arca Carania Mountain national park is opening up for tourist traffic. The national park has a number of sites worth seeing and roads that connect pairs of sites. The park commissioners have put together a set of round tours in the park in which visitors can ride buses to view va...
30,252
Tours de Sales Force Description: The Weight For It company sells home gym equipment to clients in multiple states. Each salesperson in a state is currently in charge of a specific district made up of $3$-$8$ clients. Each salesperson has mapped out the shortest path with which to visit all of their ...
30,253
Tower Construction Description: Kim’s current obsession is to build towers from ordered sequences of Lego bricks. The towers are built one at a time, brick by brick. The first available brick is the base of the first tower. If the next available brick is wider than the top of the current tower, we say ...
30,254
Tower of noiHa Description: The Tower of Hanoi is a mathematical game consisting of three rods and a number of disks of various diameters, which can slide onto any rod. The puzzle begins with the disks stacked on the first rod in order of size, the smallest at the top, thus approximating a conical shap...
30,255
Towers of Powers 2: Power Harder Description: Remark: We were originally planning to give you this in the real contest, but since we have too many awesome problems for you for tomorrow and this one is just way too easy, we decided to move it to the dress rehearsal as a sneak preview. In this problem w...
30,256
Toy Railway Description: Each switch looks as in Figure 1 and can be set to either of two states: B or C. If the trains enters at A it goes to B or C depending on the state of the switch. On the other hand, if the train enters at B or C, it always goes to A regardless of the state of the switch. The s...
30,257
Toy Train Tracks Description: To study the feasibility of automating the layout-creation process, TTTCC is interested in constructing train courses using two different shapes: straight line segments, and $90$-degree turns (see Figure 1). Valid layouts are created by placing these shapes on a squar...
30,258
Toys Description: Little Lark has a great collection of of toys. Although she has plenty of toys she only likes to play with one at a time. She decides which toy to play with by placing all the toys in a circle around her, numbering them $0$ to $T-1$. She then spins around in the clockwise direction an...
30,259
Track Smoothing Description: Bob has the task to plan a racing track of a specific length. He thought it is a great idea to just form a convex polygon that has exactly the required length. Then he was told that racing cars cannot drive such sharp corners like in his plan. He has to ensure some minimal...
30,260
Tracking Shares Description: You are an experienced investor who is investing in multiple companies. At the end of the year you are expected to file your taxes, which requires you to track and report the total number of shares you held during any of your trading days during the year. The records you h...
30,261
Tractor Description: Bessie the Cow has stolen Farmer John’s tractor and is running wild on the coordinate plane! She, however, is a terrible driver, and can only move according to the following rules: * Each of her movements is in the same direction as either the positive $x$-axis or the ...
30,262
Trade Routes Description: All roads lead to Rome. In this case, we mean every road in the road network in the Roman Empire can be travelled in only one direction. Each city that is not Rome has exactly one road that leaves it and by following these roads, you will always end up in Rome. Each city, inc...
30,263
Traffic Blights Description: Cars! Where do they come from? Where do they go? Nobody knows. They appear where roads have been built, as if out of nowhere. Some say that no two cars are alike. Some say that if you look closely, you can see the pale ghosts of miserable humans inside them, trapped forever...
30,264
Traffic Lights Description: You are staring down a street with $n$ traffic lights. Each traffic light has been set to alternate its color between $r$ seconds of red and $g$ seconds of green based on the two duration parameters $r$ and $g$. These two parameters may vary across different traffic lights. ...
30,265
Trafikverket's Mistake Description: The unthinkable has happened! The plan laid by the traffic department (Trafikverket1) has gone awry. Just before people were about to leave work in the small town of Lönnköping, a horrendous snowstorm knocked out all the internet in the town. Since the internet is do...
30,266
Trafikverket's Plan Description: During the winter, far too many accidents occur in Lönnköping due to icy roads. Because the municipality of Lönnköping wanted to appear even more efficient than the cat kingdom Katen’s conquest (see Segment Monitoring), their road network has very few roads. The $N$...
30,267
Trailing Digits Description: A large shipment of doodads has just arrived, and each doodad has a suggested retail price of $b$ cents. You’ve noticed that consumers are much more likely to purchase goods when most of the trailing digits are the same. For example, items are more likely to be priced at $9...
30,268
Trailing Digits Description: You are given a positive integer $n$ and should print the last ten digits of $1^1 + 2^2 + 3^3 + \dots + n^n$. ## Input The first and only line of input contains a positive integer $10 \leq n \leq 10^{7}$. ## Output Print the last ten digits of $1^1 + 2^2 + 3^3 + \dots +...
30,269
Train Addiction Description: Catherine loves toy trains. In fact, she loves them so much that her parents are starting to get worried, so Catherine spends her days and nights building toy trains when her parents are not watching. The store down the street where Catherine lives sells identical toy train...
30,270
Train Boarding Description: Punctual City is well known for the punctuality of its citizens and its public transportation system. It is particularly famous for its train system. It is always on time, and never too late (or even too early). Statistics about train boarding is regularly collected to keep ...
30,271
Train Delays Description: Last year, some of the judges tried to travel to NWERC’10 by train. This turned into a big disaster: on the way there, a fire in a control room caused huge delays, while on the return trip, trains in Bremen were delayed due to a terrorist threat in Hamburg. Of course, these hu...
30,272
Train Journey Description: A group of people are going to travel by train and are thinking about where they are going to sit. A group of people are going to travel by train and are thinking about how to sit. $M$ pairs of people are friends and want to sit as close to each other as possible. The tra...
30,273
Train Line Description: The Intranational Communications Policy Corporation (ICPC) has hired you to complete a new rail line to ensure flow of human and physical capital across a sector of the United States. The path of the railway has already been decided, but where to place the stations is still up f...
30,274
Train Passengers Description: The Nordic Company of Passing Carriages is losing money at an alarming rate because most of their trains are empty. However, on some lines the passengers are complaining that they cannot fit in the cars and have to wait for the next train! The authorities want to fix this sit...
30,275
Train Sorting Description: Erin is an engineer. She drives trains. She also arranges the cars within each train. She prefers to put the cars in decreasing order of weight, with the heaviest car at the front of the train. Unfortunately, sorting train cars is not easy. One cannot simply pick up a car an...
30,276
Train Tickets Description: The Stockholm public transport system offers $12$ kinds of tickets for purchase. The $i$’th kind of ticket is valid for exactly $i$ consecutive months. However, they also change the price of every kind of ticket every year. Katriel has access to the pricing data for the last...
30,277
Train Timetables Description: A train line has two stations on it, A and B. Trains can take trips from A to B or from B to A multiple times during a day. When a train arrives at B from A (or arrives at A from B), it needs a certain amount of time before it is ready to take the return journey – this is ...
30,278
Training Description: Ashley is training for a programming contest on Brandon’s Online Judge. Brandon’s Online Judge has a new feature which allows Ashley’s coach, Tom, to load a list of problems for Ashley. Tom has curated some problems for Ashley to work on. Each problem has two integers as a lower ...
30,279
Training, Round 2 Description: Ashley is training for another programming contest on Brandon’s Online Judge. Brandon’s Online Judge still has the same feature which allows Ashley’s coach, Tom, to load in a list of problems for Ashley to work on. Tom has curated some problems for Ashley to work on. Each ...
30,280
Training, Round 3 Description: Ashley is training for another programming contest on Brandon’s Online Judge. Ashley has $k$ weeks left to train for her next programming contest. Her coach, Tom, is very busy and is no longer curating specific problems for Ashley to train on. At the start of every week,...
30,281
Trains Description: Trains are cool. You can get pretty much anywhere in Europe on a train, including little towns. In Canada, train service is not quite as good. Sometimes you have to change trains many times, and it is often hard to know the quickest route and where to switch. Depending on the time o...
30,282
Trains Description: You have arrived in Vilnius and want to visit various cities in Lithuania. Cities in Lithuania are located on a straight line and numbered from $1$ to $N$ sequentially. Vilnius is assigned the number $1$. Each city has a train station with a single train route that operates fr...
30,283
Tram Description: ## Input The first line of input consists of an integer, $1\leq N\leq 10^5$, the number of citizens in Lund. Then follow $N$ lines, with two space-separated integers $x_ i,y_ i$ ($|x_ i|,|y_ i|\leq 10^6$), the coordinates of citizen $i$’s home. ## Output The output consists of a si...
30,284
Transit Card Description: Since you miss your friends back home, you will frequently be going home for a few days. On the one hand, it seems wasteful to pay for keeping the transit card charged during the days you are away. But on the other hand, if you do not keep it charged then you have to start a n...
30,285
Transit Woes Description: Everyday Yraglac relies on his city’s local transit system to get to and from campus. Since this is routine for him, he’s memorized exactly what time will let him leave his house and make it in time to his first morning class. Of course transit being transit, they decided to c...
30,286
Translation Description: You just got a summer internship at a local translation bureau. However, the job is very boring. They refuse to actually use the human mind to make translations; instead, they get “optimal” translations by directly translating each word from a dictionary. Because this is extrem...
30,287
Translators' Dinner Description: It is time again for the annual International Convention for Phonetic Communication. Because there are attendees from all over the world, and they do not all speak the same languages, the organizers have hired translators to help out. To thank the translators at the end of...
30,288
Transparency Description: You must audit a factory that produces a number of products. Each product is subject to its own taxation rules and regulations. Unfortunately, deciding which rules apply to a product is not obvious since it can be difficult to distinguish the products from one another. It is y...
30,289
Transportation Delegation Description: You have just been hired by Amalgamated, Inc. in the country of Acmania to oversee the transportation of raw materials to the company’s factories. Each supplier of raw materials and each factory resides in one of Acmania’s states. No state has both a factory and a...
30,290
Transportation Planning Description: As a city planner, you have spent a lot of time building a set of two-way roads so that people can get from anywhere in the city to anywhere else just by driving on the roads. Now that that’s done, you are concerned with how much time commuters spend on the road eac...
30,291
Trapezoid Walkway Description: You are planning to place a small, prefabricated gazebo in your back yard, with a paved walkway connecting it to your back porch. You’ll build the walkway out of paving stones purchased at your local home improvement store. The paving stones come in a variety of sizes, bu...
30,292
Trapizza Description: Tryggvi, the owner of Mahjong Pizza, and Ómar, the owner of Trapizza, are nemeses. They always run into each other downtown and their conversations always end up in heated arguments, more often than not related to their pizzas. Tryggvi says that trapezoid shaped pizzas are immoral...
30,293
Trash Description: From her friends, Theta learned a $2$-player card game called Trash. Trash is played with a standard $52$-card deck consisting of Ace, $2$ to $10$, Jack, Queen, and King in each of the $4$ suits. Each player is dealt $10$ cards face down that are arranged in $2$ rows for each pla...
30,294
TraveLog Description: After a long time apart, Alice and Bob have reunited. They live in a country with $n$ cities, creatively named city $1$ to city $n$. Bob drove from his home in city $1$ to Alice’s home in city $n$. When Alice asked Bob which path he took, he was stunned to find he didn’t reme...
30,295
Travel Planning Description: Alice and Bob spend this summer planning next year’s summer vacation. They want to travel from the old city of A-town to the popular summer resort B-ville, but they haven’t yet decided which other places to visit en route. There are $N$ places to visit in total, numbere...
30,296
Travel the Skies Description: One day your boss explains his new planning scheme for your company, Fly Away Air. Rather than having customers book tickets between destinations, they’ll say when they want to leave and from where, and your company will take care of the rest. That means you get to generat...
30,297
Traveling Merchant Description: There is a long east-west road which has $n$ towns situated along it, numbered $1$ to $n$ from west to east. All towns buy and sell the same kind of goodie. The value of a goodie fluctuates according to a weekly schedule. A town buys and sells a goodie at its value in th...
30,298
Traveling Monk Description: The following puzzle was popularized by Martin Gardner’s book “My Best Mathematical and Logic Puzzles,” although it appears first in the monograph “On Problem-Solving” by the Gestalt psychologist Karl Dunker. One morning, exactly at sunrise, a Buddhist monk began to climb...
30,299