task
stringlengths
0
154k
__index_level_0__
int64
0
39.2k
Námsleið Description: The semester is coming to an end so it is time to plan your studies and choose courses for the next semester. Oh no! This list is so confusing! Each course has so many prerequisites! With such a chaotic layout, is it even possible to sign up for and complete all the courses in any...
29,000
Níulegasti grunnurinn Description: Jörmunrekur was playing around with writing some numbers in different bases. He started by trying $203433$. His favourite number is nine, so he doesn’t particularly care for this number. But if he writes it in base $16$ it becomes $31AA9$ which is a clear improvem...
29,001
Núll og tveir Description: Arnar and Arnar are looking at numbers together. Arnar only likes the digit $0$ while Arnar only likes the digit $2$. Since Arnar and Arnar are friends, they like numbers that have each others’ favorite digits. The numbers are however not allowed to contain any other digi...
29,002
Obfuscation Description: It is a well-known fact that if you mix up the letters of a word, while leaving the first and last letters in their places, words still remain readable. For example, the sentence “tihs snetncee mkaes prfecet sesne”, makes perfect sense to most people. If you remove all spaces f...
29,003
Ocean Currents Description: For a boat on a large body of water, strong currents can be dangerous, but with careful planning, they can be harnessed to help the boat reach its destination. Your job is to help in that planning. At each location, the current flows in some direction. The captain can choos...
29,004
Ocean Monument Description: Steve has stumbled across an ocean monument and would like to raid it. He has put on his best set of armor and brought his favorite trident in search of the rumored sponge room. The monument is protected by a lot of angry guardians and elder guardians. The mobs are very strong,...
29,005
Ocean's Anti-11 Description: Note that this is an easier version of the problem anti11hard. Danny Ocean likes many things: casinos, elaborate heists, and complicated romantic relationships. But it’s a little-known fact that Danny loves binary strings most of all — binary strings of any length and comp...
29,006
Ocean's Anti-11 (Hard) Description: Note that this is a harder version of the problem anti11. Danny Ocean likes many things: casinos, elaborate heists, and complicated romantic relationships. But it’s a little-known fact that Danny loves binary strings most of all — binary strings of any length and co...
29,007
Octopus Game! Description: It is this time of annual Octopus Game, a survival game where the winner stands to win millions of dollars, sponsored by His Excellency, Lord Pooty! Today is Day $1$ of the Octopus Games where the first round of culling begins! You are tasked with organising the games for...
29,008
Odašiljači Description: The mayor has decided that it is high time to implement a new system of television transmitters. The city can be represented as a segment of the length $D$ on which there are buildings of different heights. The width of a building is negligible. On top of some buildings, tel...
29,009
Odd A's, Even B's Description: Fredrik prefers to have his life in perfect order. His i’s should be dotted, his t’s should be crossed, his a’s should be odd and his b’s should be even. Odd a’s? Even b’s? You see, Fredrik is a great fan of the Swedish pop wonder ABBA. As a tribute, he likes writing songs ...
29,010
Odd Binomial Coefficients Description: You might be familiar with the binomial coefficient ${m \choose k}$ defined as ${m \choose k} = \frac{m!}{k!(m-k)!}$, where $m$ and $k$ are non-negative integers and $k \leq m$. Let $T_2(n)$ be the number of odd binomial coefficients such that $0 \le k \le...
29,011
Odd Echo Description: ECHO! Echo! Ech... You love shouting in caves to hear your words echoed back at you. Unfortunately, as a hard-working software engineer you are not lucky enough to get out that often to shout in caves. Instead, you would like to implement a program that serves as a replacement fo...
29,012
Odd Gnome Description: According to the legend of Wizardry and Witchcraft, gnomes live in burrows underground, known as gnome holes. There they dig up and eat the roots of plants, creating little heaps of earth around gardens, causing considerable damage to them. Mrs. W, very annoyed by the damage, has to...
29,013
Odd Man Out Description: You are hosting a party with $G$ guests and notice that there is an odd number of guests! When planning the party you deliberately invited only couples and gave each couple a unique number $C$ on their invitation. You would like to single out whoever came alone by asking all ...
29,014
Odd and Even Zeroes Description: In mathematics, the factorial of a positive integer number $n$ is written as $n!$ and is defined as follows: The value of $0!$ is considered as $1$. $n!$ grows very rapidly with the increase of $n$. Some values of $n!$ are: You can see that for some va...
29,015
Oddities Description: Some numbers are just, well, odd. For example, the number $3$ is odd, because it is not a multiple of two. Numbers that are a multiple of two are not odd, they are even. More precisely, if a number $n$ can be expressed as $n = 2 \cdot k$ for some integer $k$, then $n$ ...
29,016
Odds of Mia Description: Instead, a roll is scored as follows: * Mia ($12$ or $21$) is always highest. * Next come doubles ($11$, $22$, and so on). Ties are broken by value, with $66$ being highest. * All remaining rolls are sorted such that the highest number comes first, wh...
29,017
Odometer Analysis Description: Tommy Catkins wants to buy a used car, and has asked you to help him figure out if it has been serviced appropriately. You happen to know with certainty that the only previous owner of the car Tommy is interested in was a travelling salescat who drove at least $2\, 000$ ...
29,018
Off-World Records Description: As humans work toward establishing a permanent presence on other planets and their moons, as well as on our own moon, various sporting bodies are under pressure to rethink the notion of a world record. Traditionally an athlete on Earth sets a new world record in a particu...
29,019
Office Building Description: Company Z has purchased a land lot for their new office building. The land is shaped like a rectangular grid with $r$ rows and $c$ columns, in which each cell has a tree. The age of each tree is known. Because Company Z is at the innovative front of the world, their new of...
29,020
Office Number Description: Nathan is a mathematician at a famous university who often sees patterns in the world around him. One day he notices that his office number, which happens to be $224$, has an interesting property: it can be written as a sum of non-negative powers of its digits. In particular,...
29,021
Office Space Description: Your company is moving to a new, larger office building. The new office is a rectangular space that will eventually be populated with cubicles. Your employees want to request particular positions for their cubicles, so you are setting up a system that lets them make these requ...
29,022
Ograda Description: Matija needs to paint his old fence. The fence is made from $N$ planks, each $1$ cm in width and varying in height. To do this easy and fast, he bought himself a Super Paint Roller Deluxe. The paint roller is $X$ cm wide. The Super Paint Roller Deluxe model comes with a catch, h...
29,023
Oil Description: A large part of the world economy depends on oil, which is why research into new methods for finding and extracting oil is still active. Profits of oil companies depend in part on how efficiently they can drill for oil. The International Crude Petroleum Consortium (ICPC) hopes that ext...
29,024
Oktalni Description: Slavko is learning about different numeral systems. Slavko is not the brightest when it comes to math, so he is starting out converting binary numerals to octal. The algorithm Slavko uses is this: * Pad the binary numeral with zeros on the left until the number of digits is di...
29,025
Okvir Description: Mirko has assembled an excellent crossword puzzle and now he wants to frame it. Mirko’s crossword puzzle consists of $M \times N$ letters, and the frame around it should be $U$ characters wide on top, $L$ characters on the left, $R$ characters on the right and $D$ charact...
29,026
Okviri Description: “Peter Pan frames” are a way of decorating text in which every character is framed by a diamond- shaped frame, with frames of neigbhouring characters interleaving. A Peter Pan frame for one letter looks like this (‘X’ is the letter we are framing): ``` ..#.. .#.#. #.X.# .#.#. ..#.. ```...
29,027
Old School Days Description: I don’t know how you feel about your school time, but I become maudlin when I remember those days. One of our teachers told us at the final year that among all the educational institutions in life one misses his/her school days the most. And yes, I miss those days a lot. L...
29,028
Old Wine Into New Bottles Description: Wine bottles are never completely filled: a small amount of air must be left in the neck to allow for thermal expansion and contraction. If too little air is left in the bottle, the wine may expand and expel the cork; if too much air is left in the bottle, the win...
29,029
Older Brother Description: Your older brother is an amateur mathematician with lots of experience. However, his memory is very bad. He recently got interested in linear algebra over finite fields, but he does not remember exactly which finite fields exist. For you, this is an easy question: a finite fi...
29,030
Olympiad Training Description: Besides the prestigious ACM-ICPC contest, Nha Trang University also hosted the Vietnamese Collegiate Olympiads in Informatics 2016. This Olympiad had several events where students compete individually to show their skills and knowledge. After a successful contest this ye...
29,031
Olympus Måns Description: Your Swedish friend Måns loves to take pictures of himself with mountaintops (or at least hilltops) in the background. Måns owns a tripod on which he can mount the camera at a height of up to $4$ feet. He wants to include the highest mountaintop in the picture. How far awa...
29,032
On Average They're Purple Description: Alice and Bob are playing a game on a simple connected graph with $N$ nodes and $M$ edges. Alice colors each edge in the graph red or blue. A path is a sequence of edges where each pair of consecutive edges have a node in common. If the first edge in the pair is ...
29,033
On-Call Team Description: An IT company has formed an on-call team of software engineers who will manage their backend services and make sure that these services run without interruption. When services go down, for each service that is down the on-call team must dispatch one member who is familiar with...
29,034
Once in a Blue Moon Description: Luna and her brother Solomon live very far from each other. To make sure they still meet now and then Luna has already booked in a number of days in which she will go and visit Solomon. The only way for Luna to get to Solomon is by taking the Orbital. Since Solomon is p...
29,035
One Chicken Per Person! Description: Dr. Chaz is hosting a programming contest wrap up dinner. Dr. Chaz has severe OCD and is very strict on rules during dinner, specifically, he needs to be sure that everyone take exactly $1$ piece of chicken at his buffet, even if that will result in an enormous ...
29,036
One-Way Roads Description: In the ACM kingdom, there are $N$ cities connected by $M$ two-way roads. These cities are connected, i.e., one can reach from any city $X$ to any other city $Y$ by going through some of these roads. One day, the government wishes to assign for each road a direction, such that one...
29,037
Ones Description: Given any integer $1 \le n \le 100\, 000$ not divisible by $2$ or $5$, some multiple of $n$ is a number which in decimal notation is a sequence of $1$’s. How many digits are in the smallest such a multiple of $n$? There are at most $1000$ test ...
29,038
Onion Primes Description: An onion is a vegetable that is well known for its layers that can be peeled off to reveal … more layers of onion. This is the inspiration for the idea of an onion prime,1 which is a prime number with an analogous layered structure. More precisely, a positive integer, $n$,...
29,039
Oooh I See Description: Captain O’Capten has hidden some treasure and created a map to mark where it is buried. Rather than using ‘X’ to mark the spot, he has decided to obfuscate the location by using a grid of uppercase O (the letter O) characters and 0 (the number 0) characters. The treasure’s p...
29,040
Oop Description: Little Matej is solving an OOP (Object-oriented programming) laboratory exercise and he’s having trouble with solving one subtask. He is given a set that contains $N$ words. He is also given $Q$ queries where each query is one pattern. A pattern consists of a single character “*” ...
29,041
Open Source Description: At an open-source fair held at a major university, leaders of open-source projects put sign-up sheets on the wall, with the project name at the top in capital letters for identification. Students then signed up for projects using their userids. A userid is a string of lower-ca...
29,042
Open-Pit Mining Description: Open-pit mining is a surface mining technique of extracting rock or minerals from the earth by their removal from an open pit or borrow. Open-pit mines are used when deposits of commercially useful minerals or rocks are found near the surface. Automatic Computer Mining (ACM...
29,043
Opening Ceremony Description: For the grand opening of the algorithmic games in NlogNsglow, a row of tower blocks is set to be demolished in a grand demonstration of renewal. Originally the plan was to accomplish this with controlled explosions, one for each tower block, but time constraints now requir...
29,044
Opportunity Cost Description: As with most types of products, buying a new phone can be difficult. One of the main challenges is that there are a lot of different aspects of the phone that you might care about, such as its price, its performance, and how user-friendly the phone is. Typically, there wil...
29,045
Optimized Cheating Description: Bob’s favorite game just released a limited-time item for sale that will boost his game character’s power significantly. However, there is not enough time for Bob to acquire sufficient in-game currency to purchase the item. Bob thus decides to resort to a cheat tool he f...
29,046
Orangestone Network Description: Sensing an opportunity, you decide to become a telecommunications mogul by connecting $n$ villages with orangestone links. To save costs, you use the minimum number of links required to connect all $n$ of the villages, and since lag would be unbearable otherwise, any tw...
29,047
Ordered Problem Set Description: You are running a programming contest that features $n$ problems of distinct difficulties. You wish to announce ahead of time that the problems are ordered in such a way that, if the problems are divided into $k$ sections numbered $1$ through $k$, each with exac...
29,048
Ordering Hotbar Description: Dan is an epic gamer attempting his longest speedrun yet. Before he makes his attempt, he wants to organize his hotbar so that it is easier to use. The hotbar is a list of items that are usually displayed on the bottom of the screen that are available to the player to use t...
29,049
Orderly Class Description: Ms. Thomas is managing her class of $n$ students. She placed all her students in a line, and gave the $i$-th student from the left a card with the letter $a_ i$ written on it. She would now like to rearrange the students so that the $i$-th student from the left has a ca...
29,050
Ordinals Description: The Von Neumann ordinals are a number system. Ordinal numbers can be represented as sets of all numbers less than that number: ## Input Input consists of a single integer $0 \le n \le 8$. ## Output The output is the representation of that number as a set as specified above. **Sam...
29,051
Ordinary Ordinals Description: Sets, sets, sets. Everything in math is just a set. Even the natural numbers can be represented as sets. For example, we can represent the the number $0$ as the empty set $\{ \} $. The number $1$ can be represented as $\{ \{ \} \} $. But what about $2$? Consider $\{ \{ \} , ...
29,052
Oreperations Research Description: You run a massive mining facility that extracts ore from a mine and loads it onto long trains for shipment to factories around the nation. A train consists of $n$ cars, where car $i$ has capacity $c_ i$, indicating how many tons of ore it can carry. Ore is dropped into th...
29,053
Organ-free Man Description: Every so often, a shipment of universal robots comes from Earth to Mars in order to help you with routine colonization tasks. The robots are called Organ-free Men (precisely OFMv5001.41.912) and each one of them is identified by a unique serial number, which is a positive in...
29,054
Organising the Organisation Description: I am the chief of the Personnel Division of a moderate-sized company that wishes to remain anonymous, and I am currently facing a small problem for which I need a skilled programmer’s help. Currently, our company is divided into several more or less independent...
29,055
Organizator Description: Unexpected problems with law enforcement have convinced Mirko to take up a less lucrative but less morally ambiguous career: he has become the chief organizer of a team computer science contest. There are $N$ CS clubs that wish to participate in the contest. The presidents of ...
29,056
Origami Description: Origami is the old Japanese art of folding single sheets of paper into the forms of animals, flowers and other figures. Recently a programmable machine was constructed to make some of the simpler kinds of origami. This machine has a large board with coordinate system drawn on it. F...
29,057
Ornaments Description: Your task is to write a program that calculates the length of the string, given the radius $r$ of the circle, the distance $h$ from the knot to the center of the circle, and some multiplier to account for the excess needed to tie the knot. ## Input The input will contain multip...
29,058
Orphan Backups Description: GigantoCorp has a problem. They have removed all tape drives from their data center and are doing all of their backups to disk storage. However, they seem to have used more disk space than their backup software indicates should be in use. They think that there are files on t...
29,059
Ortest Path Description: Consider an undirected graph where each edge $e$ is labelled by a truth value $b(e)\in \{ 0,1\} $, where we interpret $0$ as false and $1$ as true. An ortest path is a simple path whose disjunction (Boolean “or”, $\vee $) is $1$, i.e., where $b(v_1v_2) \vee \dots \v...
29,060
Orthogonal Rotation Description: You are given two vectors $v_1, v_2$ of the same length $n$. You need to make them fit together, which means that they have to be orthogonal to one another. Possibly they fit together from the start, but if not we can amend this. We can rotate $v_2$, meaning that we can...
29,061
Orðla Description: After each guess the computer gives some hints by colouring the letters of the guess word, the colours signifying how close the word is to the secret word. The computer colours the letters in the following way: * Letters that match the corresponding letters in the secret word ar...
29,062
Other Side Description: John Doe wants to transport his possessions from one bank of Lake Michigan to the other. His possessions consist of $W$ wolves, $S$ sheep, and $C$ cabbages. The transportation will be carried out using a boat that can hold up to $K$ of these items at the same time. During each s...
29,063
Otpor Description: Mirko has been a very good boy, so he got exactly what he wanted for his birthday, a “Young physicist” kit! In the kit, there are $N$ types of resistors, connecting wires and an ohmmeter. If a resistor is of type $i$, it provides a resistance of precisely $R_ i$ ohms. As we ...
29,064
Out of Context Description: It’s that time of year: election season. Political speeches abound, and your friend the armchair pundit likes to find quotes of politicians and use them out of context. You want to help your friend by developing a method to search through text for specified patterns. One of...
29,065
Out of Sorts Description: Ann Logan is fascinated with finite sequences of integers. She is particularly interested in sequences of the form $x_1, x_2, \ldots , x_ n$ where: * $x_{i} = (ax_{i-1}+c)\mod m$, * $n$, $m$, $a$, and $c$ are positive integer constants, * $x_0$ is a non-...
29,066
Outer Space Invaders Description: The aliens from outer space have (finally!) invaded Earth. Defend yourself, or be disintegrated! Or assimilated. Or eaten. We are not yet sure. The aliens follow a known attack pattern. There are n attackers, the $i$-th one appears at time $a_ i$, at distance $d_ ...
29,067
Outing Description: Organising a group trip for the elderly can be a daunting task... Not least because of the fussy participants, each of whom will only make the trip on condition that some other participant also comes. After some effort, you have taken from each of your participants a number, indica...
29,068
Outsourcing Description: Mr. Cooper is a manufacturer of science fiction action figures and he thinks that his local factory causes too many costs. He once heard of certain foreign countries where workers are much less expensive and also more dedicated. So he decided to look for an available action fig...
29,069
OvalWatch Description: It’s the year 2020 and OvalWatch is the most popular massive online first person shooter game. OvalWatch features a set of $N$ characters, and during a match, each player can choose one of these characters to play. In order to keep each match interesting, for every match, OvalWatch...
29,070
Over the Hill, Part 1 Description: Hill encryption (devised by mathematician Lester S. Hill in 1929) is a technique that makes use of matrices and modular arithmetic. It is ideally used with an alphabet that has a prime number of characters, so we’ll use the $37$ character alphabet A, B, $\ldots $, Z, ...
29,071
Over the Hill, Part 2 Description: Bob Roberts is part of a crack espionage team working for the CIA (Chocolate Institute of Alabama) and he is working on decrypting the encoded messages of their arch rivals at the NSA (Nougat Society of Arkansas). Fortunately, the NSA’s espionage staff is not nearly a...
29,072
Overdraft Description: Banks often charge overdraft fees if you attempt to withdraw more money from your account than is available in your current balance. Given a sequence of deposits and withdrawals (and assuming each deposit and withdrawal is immediately reflected in your balance), determine the min...
29,073
Overlapping Maps Description: Fred and Sam are traveling together. Both have maps of the area. The maps cover exactly the same territory, and have exactly the same ratio of width to height, but Sam’s is at a smaller scale than Fred’s, so it’s a bit smaller. Fred puts his map on a table. Sam throws his ...
29,074
Ozljeda Description: Due to the frantical usage of the racket to kill flies, Marin has sustained a serious bodily injury known to the medical community as epicondylitis lateralis humeri. His grandma has advised smearing rakija over it, the doctor has prescribed a strong painkiller, but Marin has ignore...
29,075
PUBNite Description: Recently, Anthony has really gotten into the battle royale games. His favorite game is PUBNite. In PUBNite, many players fight against each other and try to be the last one alive. One of the most well-known mechanics in PUBNite is the safety zone, which is a circular area. Players ...
29,076
Pachinko Description: You have been hired by Addictive Coin Machines to help design the next hit in their line of eye-catching, coin-guzzling, just-one-more-try Pachinko machines for casinos around the world. Playing a Pachinko machine involves launching balls into a rectangular grid filled with pegs,...
29,077
Pachinko Probability Description: A pachinko machine is a Japanese invention that is sort of like a pinball machine. Each pachinko machine uses marbles which fall from the top and bounce off of fixed pins until they reach the bottom. When they reach the bottom, if they fall into a particular area (a ‘g...
29,078
Pachyderm Peanut Packing Description: You are an elephant working for peanuts. The job that you do is to walk around the packing plant and make sure that peanuts are being packed correctly. Peanuts at your plant are packed by size — small, medium, and large. You walk around and note every peanut that i...
29,079
Packagemanager Description: Doris has started her work as a packagemanager at the Pacman company (a part of the Sudo group). Her job is to make sure each of their stores has the most recent model of envelope, cardboard box, etc. Doris would however like to automate this task. She has a list of all typ...
29,080
Packing Pests Description: You are an employee #333-4-591032 at a candy sorting company. Your job is simple. $N$ candies, of $M$ different colors, will be thrown in your direction, one at a time. The $i^\text {th}$ thrown candy will have color $C_ i$ and value $V_ i$. Each time, you must either swa...
29,081
Padel Prize Pursuit Description: There are $N$ participants numbered $0$ to $N-1$ competing in a padel tournament held over $M$ days. Exactly one match is held each day. There are $M$ medals handed out in the tournament, a new one for each match. In the match on day $i$ $(0 \le i \le M-1)$, the...
29,082
Page Layout Description: When you are designing a complicated document, page layout is important. Newspapers and magazines don’t just put a whole bunch of text that covers the page left-to-right, listing one article after another. They put multiple articles on a page, at different positions designed to...
29,083
Paint Description: You are painting a picket fence with $n$ slats, numbered from $1$ to $n$. There are $k$ painters willing to paint a specific portion of the fence. However, they don’t like each other, and each painter will only paint their given portion of the fence if no other painter overlaps their por...
29,084
Paint Buckets Description: Gladys runs a paint shop with a huge stock of paint buckets of various volumes and hues. One of the special features of her shop is that she takes orders of any of the $10^9$ colors there are. On the surface of things, this cannot be possible – of course, there is not spa...
29,085
Paintball Description: Marek and his schoolmates have just finished their studies at the university. They wanted to celebrate it with a game of paintball. After an hour of playing a very strange thing happened – everyone had exactly one bullet left. Marek, being a very curious person, wanted to know wh...
29,086
Paintball II Description: You are playing paintball on a $1000\times 1000$ square field. A number of your opponents are on the field hiding behind trees at various positions. Each opponent can fire a paintball a certain distance in any direction. Can you cross the field without being hit by a paintball...
29,087
Painted Corridors Description: The Institute of Colorfully Painted Corridors is planning the construction of a new building. The building has numerous junctions, and corridors that each connect a pair of junctions. The corridors will be painted by amazing new painting robots that drive along the corrid...
29,088
Painting a Fence Description: You need to hire some people to paint a fence. The fence is composed of $10\, 000$ contiguous sections, numbered from $1$ to $10\, 000$. You get some offers from painters to help paint the fence. Each painter offers to paint a contiguous subset of fence sections in a part...
29,089
Paintings Description: Catherine recently got into painting minimalist art. For her next painting she wants to create an image with $N$ vertical strips of distinct colors. She always begins painting her vertical strips on the left side of the canvas and proceeds to the right side. However, there are ce...
29,090
Paired Furnaces Description: Just outside the entrance to your mine shaft you have a row of $n$ furnaces; some of them are on and some are off. Unlike regular furnaces, these furnaces can only be turned on in neighboring pairs. In one move you can either choose two neighboring furnaces which are on...
29,091
Pairing Socks Description: Being a computer scientist, her mother finds this a fair objection. Looking over her list of potential chores, she picked one she thinks should be easy to solve – pairing a number of different kinds of socks. In the beginning, there are $2n$ socks stacked in a pile. To pair ...
29,092
Palačinke Description: Ana has a couple of classmates coming over for crêpes (known as palačinke in Croatian). They are coming in $T$ minutes, and Ana just found out that she has neither one of the four required ingredients (flour, milk, eggs and jam). She hops into her car and drives around her neighb...
29,093
Paleta Description: Little Mirko spends his free time painting. For this hobby, he likes to use brushes and a palette containing $K$ colors overall. His friend Slavko decided to use Mirko’s talent and gave him his new coloring book for Mirko to color. The coloring book contains $N$ images numbered ...
29,094
Palindrome Names Description: Anna and Bob are having a baby. They both enjoy the advantage of having palindrome names, meaning that their names are spelled the same way forwards and backwards. Wanting to be good parents, they decide to give their child a palindrome name too. The only problem is that t...
29,095
Palindrome Substring Description: A palindrome is a word or phrase that reads the same backwards or forwards. For this problem, we’re going to find all the different palindromes that occur inside a string. We’ll say that string $a$ is a nontrivial palindrome substring of $b$ if $a$ is a substring of $b$, ...
29,096
Palindrome-Free Numbers Description: A string is a palindrome if it remains the same when it is read backwards. A number is palindrome-free if it does not contain a palindrome with a length greater than $1$ as a substring. For example, the number $16276$ is palindrome-free whereas the number $17276$ is...
29,097
Palindromes Description: Sam is starting a new company, and has just chosen its name. The name is a string $s = s_1s_2\dots s_ n$ of length $n$. The name is so long that customers won’t remember the full name. Rather, each customer is going to remember only a substring $t$ of the full name, and differe...
29,098
Palindromes in crosswords Description: Mr. F. just loves palindromes (a palindrome is a word that reads the same forwards and backwards). He got hold of his mom’s solved crosswords and now he is looking for palindromes in them. The crosswords are somewhat unusual: each is an $n\times n$ grid with no ...
29,099