task
stringlengths
0
154k
__index_level_0__
int64
0
39.2k
Knight Search Description: Alice is a chess knight living in Chessland (an $N \times N$ board). The cells in Chessland are numbered from $1$ to $N^2$ in row major order. Each cell has an UPPERCASE alphabet character assigned to it. The Chessland is described by a string $S$ of length $N^2$ (in row major or...
28,500
Knight of the Tarot Cards Description: Consider an infinite chessboard and a special knight whose move types can change given power-ups. The knight is trying to reach square $(0, 0)$. Some of the squares of the infinite chessboard have tarot cards on them. If the knight lands on some position $(r, c)$...
28,501
Knight's Marathon Description: After an exhausting battle, the invading army is finally defeated. The king sends his only surviving knight to the kingdom’s capital to tell the people of your victory. This might be a very (very!) long journey. The knight moves as on a chessboard: in each move, he trave...
28,502
Knight's Trip Description: In chess, each move of a knight consists of moving by two squares horizontally and one square vertically, or by one square horizontally and two squares vertically. A knight making one move from location $(0,0)$ of an infinite chess board would end up at one of the following e...
28,503
Knightly Knowledge Description: Ancient cultures had an enormous and mostly unexpected knowledge of the earth and geometry. When they were building monuments, they did not place them at arbitrary locations. Instead, each building spot was carefully selected and calculated. Nowadays we can observe this ...
28,504
Knights Description: Magnus is the youngest chess grandmaster ever. He loves chess so much that he decided to decorate his home with chess pieces. To decorate his long corridor, he decided to use the knight pieces. His corridor is covered by beautiful square marble tiles of alternating colors, just lik...
28,505
Knights in Fen Description: There are black and white knights on a 5 by 5 chessboard. There are twelve of each color, and there is one square that is empty. At any time, a knight can move into an empty square as long as it moves like a knight in normal chess (what else did you expect?). Given an initi...
28,506
Knigs of the Forest Description: All moose are knigs of the forest, but your latest moose-friend, Karl-Älgtav, is more interesting than most. In part because of his fondness of fermented blueberries, and in part because of the tribe he lives in. Each year his tribe holds a tournament to determine that ...
28,507
Knitpicking Description: To find matching socks, she simply randomly takes single socks out of the drawer until she has a matching pair. It may take a long time, for example when she keeps drawing right socks without a matching left one. How long does she need to keep drawing socks until she is guarant...
28,508
Knitting Pattern Description: Jörmunrekur had found himself with some extra time on his hands, so he decided to try to find a new hobby. After discussing this with some of his relatives, his grandparents lent him a book with knitting guides and knitting patterns. He wants to start with something big, so h...
28,509
Knockout Tournament Description: Laura is organising a knockout tournament, in which her friend Dale takes part. Laura would like to maximise the probability of Dale winning the tournament by arranging the games in a favourable way. She does not know how to do it, so she asked you for help. Naturally, ...
28,510
Knot Knowledge Description: Sonja the scout is taking a test to see if she knows all the knots a scout is supposed to know. The Scout’s Big Book of Knots has descriptions of $1\, 000$ different knots, conveniently numbered from $1$ to $1\, 000$. For the test, Sonja needs to learn a specific set of ...
28,511
Knox Description: Ellen has just bought herself a new fort to protect all her precious belongings. Her fort is of course very well protected, and in fact the only possible point of entry is the main hallway. Ellen’s hallway is a big room with a long and narrow path through the center (aligned with the ...
28,512
Kodama Hierarchy Description: You are currently trying to recruit a squad of kodama in order to take over the world. You can pick some subset of $N$ kodamas as your group. The $i$-th kodama has a level of charisma $c_i$ and a level of aura $a_i$. Both $c_i$ and $a_i$ are nonnegative. Kodamas oper...
28,513
Koffínhraði Description: Oh no! Now towards the end of the term there are all kinds of exams and final projects closing in! By your side you of course have your trusty stash of caffeinated drinks. Tea, coffee, energy drinks and more can help you cover all the material and finish all the projects in the...
28,514
Kolinje Description: Melita has just returned from the annual pig slaughter. Don’t worry, this is a regular thing in Croatia. The best part was the abundance of food! There was everything, starting from good spicy sausages, ham, black pudding, up to teewurst, top quality bacon and čvarci, all with warm...
28,515
Kolkrabbaleikarnir Description: The Oktopus Games 2022 have begun. Arnar, also known as Oktopus, invited a number of contestants to participate in this exciting contest, in which the prize is a large sum of cash. The contest includes multiple different games. At the start of the contest, the number of ...
28,516
Kolone Description: When moving, ants form rows so that each ant except the first is behind another ant. It is not widely known what happens when two rows of ants moving in opposite directions run into each other in a passage too narrow for both rows to pass through. One theory says that, in that situa...
28,517
Kornislav Description: Kornislav the turtle never has anything interesting to do. Since he’s going to live for three hundred years, he keeps trying to find way to kill time. This weekend he started playing "enclose the largest rectangle". To start with, Kornislav needs four positive integers. He tries...
28,518
Kralj Description: Young ruler Mirko has declared himself king of dwarves. Upon hearing this, Slavko felt threatened and soon declared himself king of elves! As there cannot be more than one king in the land, they have decided to resolve the issue of power once and for all. Slavko will, along with the...
28,519
Kraljevi Description: Mirko and Slavko are playing a chess like game. The game is played on a non-standard chess board sized $R$ rows by $C$ columns. Each player starts with some number of chess kings. In chess kings can move from their current field to any of the $8$ neighbouring fields. Player spread is ...
28,520
Kratki Description: All of you are probably very familiar with the problem of finding the longest monotone subsequence. You probably think you know all about it. In order to convince us, solve the problem “opposite” to finding the longest monotone subsequence. For given $N$ and $K$, find a sequenc...
28,521
Križaljka Description: Since ACTA has entered into force, Slavko has been spending his time offline, solving crosswords. Having solved almost all that he could get his hands on, he wants to make a few crosswords of his own. However, he is too sloppy for such fine work, so he has asked you to help him g...
28,522
Krtica Description: Moles are tidy and hard-working animals. Our mole likes to keep its underground residence in utmost order, so that everyone living there knows where to find things. To achieve this, the mole connected rooms with tunnels so that there is a single unique way to get from one room to any ...
28,523
Kruidnoten Description: Every week, Karlijn and her teammates join the competitive programming training at their university. Thinking and coding for such a long time is quite exhausting, and they need a ton of snacks to get through training. They have divided the chore of bringing snacks neatly: while ...
28,524
Krumpirko Description: Young Mr. Potato is opening two new stores where he will, you guessed it, sell potatoes. Mr. Potato gets his potatoes from $N$ farmers. Each farmer offers exactly $a_ i$ potatoes per bag for a total price of $c_ i$. Mr. Potato is going to buy all bags of potatoes from all far...
28,525
Kth Subtree Description: You are given an unrooted labeled tree. A subtree is a connected subgraph of this tree. The size of a subtree is the number of nodes in the subtree. Two subtrees are different if there is at least one node which is in one but not the other. The largest subtree is the original t...
28,526
Kubb Description: Apart from Liar’s dice, another game that Simon likes is the traditional Swedish game of Kubb, also known as “Viking chess”. The exact rules of Kubb are complex, and vary from household to household. However, one aspect always remains the same, which is that of hitting the opposing te...
28,527
Kuggfrågan Description: Tyko is about to start kindergarten so Maj and Måns have started looking for options. During a visit to one of the kindergartens Tyko noticed a poster on the wall. It was one of those usual PR posters on how well the the teachers, kids and parents worked together. However, on th...
28,528
Kuhar Description: Lisa works as a waitress in a restaurant. Tonight is her birthday so Lisa asked the chef to prepare his special meal for her friends. The chef’s meal is made of $N$ ingredients. To prepare one serving of the meal he needs a certain amount of each ingredient. There are some ingredien...
28,529
Kutevi Description: One day Mirko was cleaning up his room and found a ruler and a compass. He went to the school the next day and challenged his friend Slavko to a geometric construction battle. Mirko knows how to construct some angles using the ruler and compass and knows how to subtract and add any ...
28,530
Kveðja Description: Mirko is writing an email client, and he is almost done with the program. However, he is missing a feature that automatically writes signatures at the end of emails. Mirko asks you for help to implement this feature. ## Input The first line contains the name of the sender, which is a ...
28,531
Kínahvísl Description: Bartosz and his friends are playing a whispering game at their preschool. The whispering games plays out with $N$ people sitting in a circle. Some particular person (lets number them $1$) thinks of a word and whispers it to the person on their left, person $2$. Person $2$ then whisp...
28,532
LCM Pair Sum Description: One of your friends desperately needs your help. He is working with a secret agency and doing some encoding stuff. As the mission is confidential he does not tell you much about that, he just wants you to help him with a special property of a number. This property can be expre...
28,533
LCM Thief Description: There are $n$ numbers hidden in the vault of the intergalactic hall of numbers. Visitors to the hall can see the least common multiple (LCM) of these numbers as part of the exhibit. Recall that the LCM of $n$ numbers $x_1,x_2,\dots ,x_ n$ is the smallest positive integer whic...
28,534
LCM Tree Description: You are given $n$ nodes with positive integer values to be arranged into an LCM tree. In how many ways (modulo $10^9 + 7$) can you do that? Two ways are considered different if there are two nodes $x$ and $y$ so that $x$ is a child of $y$ in one way but not in the ...
28,535
Ladder Description: You are attempting to climb up the roof to fix some leaks, and have to go buy a ladder. The ladder needs to reach to the top of the wall, which is $h$ centimeters high, and in order to be steady enough for you to climb it, the ladder can be at an angle of at most $v$ degrees fro...
28,536
Ladice Description: Mirko has $N$ items (labeled with numbers from $1$ to $N$) and $L$ drawers (labeled with numbers from $1$ to $L$). All items are currently scattered throughout his room, so he decided to clean them up. Each drawer can contain one item, and in order to make it easier for Mirko to...
28,537
Lafhræddir Læknar Description: As the new hospital grows ever closer to finishing construction the doctors get ever bolder. They have been spotted past Gamla Hringbraut and even in the wetlands near the airport. This worries both the University of Iceland and University of Reykjavík. Clearly these doct...
28,538
Lamps Description: The use of incandescent light bulbs is soon being banned within the European Union, but it can already be profitable to use low energy lamps. Your task is to write a program that, given for how long a light is on each day and the price of electricity, computes after how many days the...
28,539
Land Equality Description: There is a kingdom where the old King wants to divide his land into two pieces and give them to his two descendants. The King’s land is a grid of $r$ rows and $c$ columns. Each cell in the grid has an integer value representing the prosperity of the cell, which can be $0$ (de...
28,540
Land Inheritance Description: Alob and Bice inherited from their parents a piece of land represented by a simple polygon. There is a canal represented by a straight line. Each brother inherited the lands on one side of the canal. It is possible that the land of each person consists of several disconnec...
28,541
Landline Telephone Network Description: The mayor of RMRCity wants to create a secure landline telephone network for emergency use in case of serious disasters when the city is cut off from the outside world. Some pairs of buildings in the city can be directly connected with a wire telephone line and t...
28,542
Landlocked Description: Canada is not a landlocked country: the country touches at least one ocean (in fact, it touches three). There are $46$ countries (including Bolivia and Mongolia, for example) which are landlocked. That is, they do not touch an ocean, but by going through one other country, an o...
28,543
Landscape Generator Description: Interactive Creative Players Collective (ICPC) is working on a new computer game for which they want to generate realistic landscapes. One of the ICPC engineers proposed an algorithm inspired by geological processes. The algorithm starts with a flat landscape and repeat...
28,544
Landscaping Description: Preparations for a good harvest in Spring start now and farmer John is preparing his field for a good season. He went over-budget last year, as the tractors moving up and down the hills needed more fuel than he expected. When harvesting, his tractors need to move both horizontally...
28,545
Landsreisa Description: Stefán and Eva live in Vestmannaeyjar. Eva wants to see the entire country. They intend to visit every location in the country exactly once and then end up back in Vestmannaeyjar. Stefán hates traveling and thus wants to spend the least amount of time traveling between locations...
28,546
Lane Switching Description: The Autonomous Car Manufacturer (ACM) needs to design algorithms to control their cars. One particular problem is lane switching—if the car needs to switch lanes, it wants to do so in the safest manner. Initially the car is in the leftmost lane, and the car needs to switch ...
28,547
Language Interpreter Description: When preparing for the CS3233 Final Team Contest, we (the problem setters) realized that one of the problems can be easily solved by using our custom programming language. Right after that realization, we decided to simply replace that problem with this one — write the...
28,548
Language Survey Description: You have made a survey to find where in Gridnavia each language is spoken. The following question was sent to every cell in the region: “Please indicate if one or several of the languages is spoken in your cell”. But due to a misprint, there were no choices after the questi...
28,549
Laptop Sticker Description: Your school has provided you with a laptop computer! However, they insist on putting a laptop sticker with their logo on your new computer. That sticker might be very large, and it can’t be rotated! Will it fit, with one centimeter to spare on all sides? ## Input The singl...
28,550
Laptop Stickers Description: One of Atrebla’s favourite pastimes is collecting stickers from all the conferences he attends. Due to a series of unfortunate events, all of the usual ones have been cancelled, so this year he has finally decided to start putting them onto his laptop. Atrebla has laid out...
28,551
Large Differences Description: Tom has $N$ objects of various heights, where object $i$ has height $H_ i$. He wants to line them up in a row and take a photo of them. Since he likes chaos, he wants the photo to look as disorderly as possible. In particular, given an arrangement, he will calculate the m...
28,552
Large Party Description: Irena and Sirup are organizing their engagement party next weekend. They want to invite almost everyone they know. They also bought a very big round table for this occasion. They are now wondering how they should distribute people around the table. Irena claimed that when there...
28,553
Largest Factor Description: You are given a positive integer $n$ and are to find its largest prime factor. ## Input The first and only line of input contains a positive integer $2 \leq n \leq 10^9$. ## Output Print the largest prime factor of $n$. **Sample Input 1** **Sample Output 1** ``` 52736890 ``` ...
28,554
Largest Hoarding Description: The real estate market in Metropolis is flourishing, and the main street in downtown Metropolis is now lined with a continuous row of high-rise buildings (skyscrapers). Not surprisingly, advertisers have been eager to put up large hoardings on the walls of these buildings....
28,555
Largest Pocket Description: Consider a grid of $1 \times 1$ squares, and suppose $N$ columns, each consisting of zero or more $1 \times 1$ grid-aligned blocks, are arranged in a row, all with the same baseline. A pocket is defined as an empty two-dimensional space located above the baseline and bou...
28,556
Largest Triangle Description: Given $N$ points on a $2$-dimensional space, determine the area of the largest triangle that can be formed using $3$ of those $N$ points. If there is no triangle that can be formed, the answer is $0$. ## Input The first line contains an integer $N$ ($3 \le N \le ...
28,557
Lasers Description: Consider a grid of $n$ columns and $m$ rows. Number the columns from $0$ to $n-1$ from left to right. Within the grid, some double-sided mirrors of the form “\” or “/” are placed. Assume the grid wraps around, that is, the left edge is connected to the right edge. When a lase...
28,558
Last Factorial Digit Description: The factorial of $N$, written as $N!$, is defined as the product of all the integers from $1$ to $N$. For example, $3! = 1 \times 2 \times 3 = 6$. This number can be very large, so instead of computing the entire product, just compute the last digit of $N!$ (when $N!$ is ...
28,559
Last Guess Description: If you spent any amount of time on social media at the end of last year, you are probably familiar with the word finding game Wordle, in which you need to find a five-letter English word using at most six guesses. After each guess, the letters in that guess are marked in either ...
28,560
Last Minute Description: Oh no! Chalmers Challenge is only one day away and Chalmers Coding Club haven’t had the time to prepare all tasks. As we all know, competitive programming problems are created by combining funny problem statements with computer programming methods. There are $A_{uniq}+A_{reuse}$ pr...
28,561
Lateral Damage Description: Unfortunately, your opponent appears to bend the rules to their liking, and does not always determine the placement of their ships before you start shooting. You are not impressed by their attempt at cheating, and decide to try and win the game anyway. Your goal is to locat...
28,562
Latin Square Description: A Latin Square is a $n \cdot n$ array filled with $n$ integers from $1$ to $n$, such that each number appears exactly once in each row and in each column. For example, below is a Latin Square: $1$ $2$ $3$ $2$ $3$ $1$ $3$ $1$ $2$ Gon really likes Latin Squares. He is cur...
28,563
Laundry Description: Fortunately, your washing machine is quite old and only supports three different washing programmes: A, B, and C. You can put at most $k$ items in one load, and each load can be washed using one of the programmes. Some items are easy to care for, and you can put them in any lo...
28,564
Lava Description: While walking in grand malls little Elsa likes to play a game she calls “Lava”. This is a simple game using the different colors of the floor tiles as markers for where it is safe to walk and where it is not. The rules of the game say that you’re allowed to walk on white tiles, but no...
28,565
Lawn Mower Description: The International Collegiate Soccer1 Competition (ICSC) is famous for its well-kept rectangular stadiums. The grass playing fields in ICSC stadiums are always 100 meters long, and 75 meters wide. The grass is mowed every week with special lawn mowers, always using the same strat...
28,566
Lazy Learner Description: Lang is very lazy at learning English. He is always getting distracted during English classes. Being happy with the sweet message he got from his girlfriend yesterday, Lang invented a game to play during his English class. Lang has an English dictionary containing $n$ words, deno...
28,567
Lazy Students Description: As a third-year student at Hogwarts School of Witchcraft and Wizardry, Harry must study arithmetic (known as Arithmancy in the wizard world). Today’s Arithmancy lesson revolves around addition. For homework, Harry is given four positive integers $n$, $x$, $y$, and $z$. Harry nee...
28,568
Leaderboard Effect Description: You are in charge of a programming contest with a number of distinct problems and an overall time limit. The judges provide for each problem a reading time, a coding time, and a solution probability. During the contest, teams can view a leaderboard that shows the accept...
28,569
Leapfrog Description: These frogs are experts in forming towers by climbing on top of each other. They are, however, not experts in gathering orderly on the road, so the frogs have arrived on different positions along the central road. The frogs are also notorious show offs: their every jump is as far ...
28,570
Leapfrog Encryption Description: We’ve come up with a new encryption method we call Leapfrog Encryption. It is a key-based encryption scheme where an alphabetic key specifies how letters in the plaintext (the text to be encrypted) are placed in the ciphertext (the resulting encrypted string). Here’s ho...
28,571
Learning to code Description: In the 21st century, Hunters are expected to master programming languages, in order to effectively gather information on the Internet. Gon is currently learning NenScript — the most popular programming language amongst Hunters. Today, Gon is learning variables. In NenScript,...
28,572
Left Beehind Description: If Bill has more jars of sour honey than sweet, he will be left “beehind”. If Bill has more jars of sweet honey than sour he will go to the convention. If Bill has the same number of sweet and sour jars, his friends are undecided. Lastly, Bill’s friends are superstitious, if h...
28,573
Left and Right Description: With modern technology advancement, it is now possible to deliver mail with a robot! There is a neighborhood on a long horizontal road, on which there are $n$ houses numbered $1$ to $n$ from left to right. Every day a mail delivery robot receives a pile of letters with exactly o...
28,574
Lefties vs. Righties Description: Election season has begun! The news network you work for wants to present expert opinions on a variety of important topics. To give the appearance of being unbiased, the news chief insists the experts that are interviewed cover a broad range of the political spectrum. ...
28,575
Leggja saman Description: Arnar tells Hannes how many cars he parked and Hannes tells Arnar how many cars he parked. Now they want to know how many cars they parked in total and ask for your help. ## Input The input is on two lines. The first line contains a single integer $n$ ($2 \leq n \leq 1000$), the...
28,576
Lego Lover's Triangle Description: A Lego fan wishes to build a triangular wall with 2x4 lego blocks. The bricks are to be laid in an overlapping fashion so that each brick is connected to half (a 2x2 portion) of each of the two bricks above it. She knows the dimensions she wants for the wall, however ...
28,577
Leiðangur Description: Little Óli is going off on a journey. On the way he will enounter three types of things: money, gold and jewels. When he encounters one of these things he can put it at the top in his backpack, if he wants to. But Óli will also encounter bad guys on the way. There are three kinds...
28,578
Lektira Description: Mario is making up silly games again instead of reading Dostoevsky for school. The rules of his newest game follow. First he chooses a random word from the book. Then he splits the word in two arbitrary places to get three separate words. After that he reverses the order of the let...
28,579
Lemonade Description: Simon just wanted to make cute robot dogs to keep as pets, but they turned against him. They have currently taken over his garden — where they are preparing for world domination. The robot dogs are (obviously) fueled by lemonade, and they have built a small lemonade factory using ...
28,580
Lemonade Trade Description: The lunch break just started! Your mother gave you one litre of pink lemonade. You do not like pink lemonade and want blue lemonade instead. Fortunately for you the other children in class are willing to trade with you. Each of them is willing to offer you any quantity of the ...
28,581
Less vs. Fewer Description: Grammarians of the worlds, unite! There is a blight on the English language in the form of commonly used phrases like “less days” (horrors!), which should actually be “fewer days” (music to the ears), or “amount of people” (gasp!), which should be “number of people” (all is ...
28,582
Let's Meet Description: MTR (subway) stations are common meetup locations in Hong Kong. Alice and Bob are going to meet up at one of the MTR stations. They each show up at the meeting spot in one of the stations right at noon, without remembering which station they plan to meet at. Having poor cellphon...
28,583
Let's Play Monopoly! Description: Monopoly is a fast-dealing property trading game, which is firstly designed by Elizabeth Magie and then published as well as owned by Hasbro. Since its first appearance in 1935, this game has quickly become well-known and deserves the best way of enjoying with friends ...
28,584
Letter Balloons Description: You are organizing a programming contest, and have decided that the first team to solve each problem will get a balloon in the shape of the problem’s letter. For example, suppose there are twenty-three problems in the contest, labeled A through W. The team members for Wossa...
28,585
Letter Optimization Description: The programming olympiad committee, composed of $N$ people, is going to send out envelopes with posters for the qualifier competition to all schools. To make the process faster, they have split up the tasks that need to be done. The tasks include writing addresses, putt...
28,586
Letter Wheels Description: You would like to determine whether it is possible to rotate the wheels so that every column has three distinct letters across the three wheels, and if so, determine the minimum number of rotations required. ## Input The input has exactly three lines. Each line has a string ...
28,587
Lexicographical Lecturing Description: The OUG (“Ordered University of Germany") is a renowned German university. Since it has a lot of students, student IDs are quite long strings of equal length $\ell $, where each student ID only contains lowercase letters of the English alphabet. Unfortunately fo...
28,588
Lexicography Description: An anagram of a string is any string that can be formed using the same letters as the original. (We consider the original string an anagram of itself as well.) For example, the string ACM has the following 6 anagrams, as given in alphabetical order: ``` ACM AMC CAM CMA MAC MC...
28,589
Ley Lines Description: In 1921, the amateur archaeologist Alfred Watkins coined the term “ley lines” to refer to straight lines between numerous places of geographical and historical interest. These lines have often been associated with mysterious and mystical theories, many of which still persist. On...
28,590
Leynitölur Description: Jón has a list of his 100 favourite numbers, all integers in the interval from $0$ to $10^{18}$. He cares deeply about these numbers and doesn’t want anyone finding out about them. He has decided to encrypt the numbers, doing it in the following way: * He takes a value $x$ ...
28,591
Leyniþjónusta Description: In a recent data leak, some of the things the CIA has been examining were revealed. One of the items that came to light was that they had a tool, which could find email addresses that have been obscured by adding spaces, in order to avoid spam. The Icelandic Intelligence Agen...
28,592
License Renewal Description: Rookie Bunny is helping the motor vehicle department to renew licenses for its customers. She works at the ticket machine and gives tickets to customers to tell them at which counters they will be served. There are two counters providing service in the office today. The two...
28,593
License to Launch Description: Birk has made a new shiny rocket and just received his licence from the Bluesky Global Order (BGO) to launch anytime within the next $n$ days. He is, however, worried that the rocket will hit space junk on its way. In order minimize the risk of a collision, Birk has m...
28,594
Life Forms Description: You may have wondered why most extraterrestrial life forms resemble humans, differing by superficial traits such as height, colour, wrinkles, ears, eyebrows and the like. A few bear no human resemblance; these typically have geometric or amorphous shapes like cubes, oil slicks o...
28,595
Lifeguards Description: Lifeguards have a very important job. They prevent people from drowning and allow millions of people every year to experience the joys of water. You are one of these lifeguards, and you take your job very seriously. If regulations were up to you, everyone would have to wear life...
28,596
Lifting Walls Description: The local building firm needs your help. They are building an apartment building where the walls are prefabricated and lifted in place using cranes. The building firm has located $n$ possible locations for cranes, and needs to choose some of these so that the center of ea...
28,597
Liftkarta Description: The mountain Bergurbulgur consists of $N$ points and $M$ ski slopes where all slopes have a certain difficulty rating $S_i$. For every slope there exists a T-bar ski lift going up the slope. Since T-bar lifts can be very irritating, their difficulty is the same as the ski slope t...
28,598
Liga Description: While the players are resting between sets, the station puts on tedious commercials. Zvonko fires up the teletext feature on his TV set and is reviewing the latest scores and standings in the football league. Always sharp, he has come up with a new mathematical game. The standings ta...
28,599