Curated sets
Strings and text
Parsing, matching, and tries.
Total results1,816 problems
| Topics | Judge | |||||
|---|---|---|---|---|---|---|
| Good License PlatesFor each license plate, compute a base-26 value from the three letters and compare it to the four-digit number, printing whether their difference is within 100. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Making AnagramsGiven two lowercase words, compute how many letters must be deleted in total so their remaining letters match as multisets (anagrams). | Easy2 | Hash mapString | No attempts yet | 2s | 128 MB | Judgeable |
| Prime WordSum letter values (a-z=1-26, A-Z=27-52) for a word and print whether the sum is prime (with 1 counted as prime). | Easy2 | StringMath+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Dobby's Case-Insensitive Word TestFor each test case, output the original-cased word that is smallest in dictionary order when comparisons ignore letter case. | Easy2 | StringSorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Longest Digit RunFor three given eight-digit numbers, print the length of the longest run of identical consecutive digits in each. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Coin GameCount occurrences of each of 8 possible length-3 head/tail patterns among all consecutive triples in a 40-character coin toss string, for multiple test cases. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| CryptoquoteDecode each ciphertext message by substituting letters using a given 26-letter mapping while preserving spaces. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Binary AdditionAdd two binary strings up to length 80 for multiple test cases and print the sum without leading zeros. | Easy2 | StringSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Base ConversionConvert a number given in an arbitrary base (2 to 36, using letters for digits above 9) into its decimal value. | Easy2 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Difference Between 5 and 6Given two integers, compute the minimum and maximum possible sums after freely swapping digits 5 and 6 in each number. | Easy2 | StringGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Why Is KMP Called KMP?Convert a hyphen-joined full name like Knuth-Morris-Pratt into its initials such as KMP. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Changyeong's DiaryDecode a string by replacing every vowel-p-vowel triple with the single vowel, restoring the original sentence. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Answer Pattern GuessingGiven an answer string, count matches against three fixed repeating guess patterns and report the highest score and who achieved it. | Easy2 | SimulationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| OctalConvert a binary string (up to 100 digits) to octal by padding and grouping bits in threes using the given table. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Changyeong Village Cup ShuffleTrack the position of a ball among three cups after a sequence of swap operations described by characters A, B, C. | Easy2 | SimulationString | No attempts yet | 1s | 128 MB | Judgeable |
| Number ReversalFor each number, reverse its digits, add to the original, and print YES if the sum is a palindrome, else NO. | Easy2 | StringMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Making an AcronymBuild an acronym from the first letters of words in a phrase, skipping a fixed list of filler words unless one is the first word. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Vigenère Cipher EncryptionEncrypt repeated plaintext lines with a repeating key using a shifted Vigenère cipher until a line with 0 appears. | Easy2 | StringSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Hamming DistanceFor each test case, count the positions where two equal-length binary strings differ and print the Hamming distance. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Celebrity JeopardyGiven an equation of the form variable = value, output that same equation unchanged, preserving exact spacing. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Anagram DistanceGiven many word pairs, count letters to delete from both so their letter frequency histograms match, using character counts. | Easy2 | Hash mapString+1 | No attempts yet | 1s | 256 MB | Judgeable |
| NumbersrebmunMap each letter of a company name to its phone keypad digit, then check whether the resulting digit string reads the same forwards and backwards. | Easy2 | StringTwo pointers+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Hay PointsSum dictionary values of words appearing in each job description line block until a single period terminates it. | Easy2 | Hash mapString | No attempts yet | 1s | 128 MB | Judgeable |
| BabelfishBuild a foreign-to-English word dictionary from the input, then translate each foreign word in the message, printing eh for unknown words. | Easy2 | Hash mapString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Keyboard Shifted One Key RightReplace every character of each input line with the key immediately to its left on a QWERTY keyboard, leaving spaces unchanged. | Easy2 | Hash mapString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Always Follow the Rules in ZombielandRead q quotes in order, then answer r lookups by printing the quote at that 1-based index, or "No such rule" if out of range. | Easy2 | ArrayImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Refrigerator MagnetsRead lines until END and print each line that contains no repeated letter, ignoring spaces. | Easy2 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| VotingFor each recorded vote, check quorum and compare yes and no counts to print the outcome. | Easy2 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| Mirror ImageFor each word until the terminator '#', print the string reversed with each letter replaced by its mirror image, or INVALID if any letter lacks a mirror. | Easy2 | StringHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Rock, Paper, ScissorsGiven two equal-length strings of R, P, S moves, count the rounds each player wins. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ParityRead bit strings whose last bit is missing plus a parity letter, and append the 0 or 1 that makes the parity match. | Easy2 | StringBit manipulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| The Seven Percent SolutionRead lines until a line with only '#', replacing the seven reserved characters in each with their given percent-encodings. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| QuicksumCompute a weighted checksum for each input line: sum each character's 1-based position times its letter value, where spaces count as 0, until a line with only #. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Haiku ReviewCount vowel runs per haiku line and report whether each line has 5, 7, 5 syllables or the first line that fails. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Cantor SetFor each N, print a line of 3^N characters following the Cantor set rule: each third-level block of size 3^k has its middle third blanked, dashes elsewhere. | Easy2 | RecursionImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Tire DimensionsParse a tire size code and compute its overall circumference from the section width, aspect ratio, and rim diameter. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Being Smarty!Given row R and block size N, decide whether the alternating style property P1 or P2 applies to that row. | Easy2 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Ah!Compare two strings of the form a...ah and print go if the first has at least as many a characters as the second. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Death Knight HeroCount how many of the given ability strings avoid the forbidden substring "CD". | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Card CuttingRead each game line of card values up to '*', count odd values for Cheryl and even values for Tania, and print the winner or Draw. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Travelling SalesmanCount the distinct town names in each week's list and report the total for that week. | Easy2 | Hash mapString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Jean and Joe's ClothesRead clothing sizes and count how many items go to Joe, Jean, Jane, James, or no one, per visit until N equals 0. | Easy2 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| DVDsApply a series of clamped sale and restock transactions to each DVD title's stock and report the final count. | Easy2 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Alphabet DistanceFor each test case, read two equal-length uppercase words and print the alphabet distance between the paired letters at every position. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| String TransformationsApply each letter-to-two-letters rule to the first occurrence of its letter in every word, updating the word after each rule. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Vigenère CipherEncrypt each given plaintext with the Vigenère cipher, shifting every letter by the aligned repeated keyword letter modulo 26. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Secret LocationEach of six lines encodes one number by its character count; print the first three as Latitude and the last three as Longitude in the given format. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Letter TrianglesFor each data set, print a triangle of N lines where line i repeats the ith letter in sequence, starting from a given letter and wrapping Z to A. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| DedupeFor each of several strings, collapse every run of consecutive identical letters into a single letter and print the result. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Football TeamRead names one per line and swap every i with e and every I with E in each name. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Garbled MessageRead lines of garbled text until EOF and replace every occurrence of the substring "iiing" with "th", preserving all other characters and line breaks. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| YodaFor each sentence, move its first two words to the end and print the result. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Total CountRead fighter names until a line with 0, print each name with its kill count in first-appearance order, then the grand total. | Easy2 | Hash mapImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Which WayFor each positive integer, convert it to binary and print left, straight, or right depending on whether it has more 0s, equal 0s and 1s, or more 1s. | Easy2 | Bit manipulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Caesar CipherGiven an uppercase word encrypted by shifting each letter forward three positions, shift every letter back by three to recover the original. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Comparison OperatorsRead C comparison expressions with integer operands, evaluate each, and print "Case N: true" or "Case N: false" until a line with operator E ends input. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| PangramRead sentences until a line holding a single asterisk, and print Y if a sentence contains all 26 lowercase letters, otherwise N. | Easy2 | StringHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Jingle ComposingSplit a slash-delimited composition into measures and count how many note durations sum exactly to 1. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Roll-call in Woop Woop HighRead each class's answers and count pupils into four groups: correct first try, correct late, never correct, and absent. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| String Function EncodingApply the given suffix-plus-string operation C times to each input string and print the results. | Easy2 | StringSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Odd or EvenRead N large integers up to 10^60 and print odd or even for each, judging parity from the last digit. | Easy2 | StringMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Barn EchoesGiven two lowercase strings, find the length of the longest string that is a prefix of one and a suffix of the other. | Easy2 | StringBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| IBM Minus OneFor each of n uppercase names, shift every letter to the next letter of the alphabet, wrapping Z to A, and print the result with numbered headers. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Deli DeliFor each of N words, apply the first matching pluralization rule from a list of irregular forms and four suffix rules, then print the result. | Easy2 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Hard to Believe, but True!Read the numbers in each equation backwards, add them, and check whether the sum equals the backwards-read result. | Easy2 | StringMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Rotating LettersGiven a single uppercase word, decide whether every letter belongs to the set of seven letters that look the same after a 180-degree rotation. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Icon ScalingRead scaling factor k and print the fixed 3x3 icon with every character expanded into a k-by-k block. | Easy2 | StringImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| Big Bang SecretsDecode an uppercase word by shifting each letter backward by S = 3P + K positions, where P is the letter's 1-based position. | Easy2 | ImplementationString+1 | No attempts yet | 2s | 512 MB | Judgeable |
| English or French?Count the letters t and T against s and S across N lines and print English if t wins, otherwise French. | Easy2 | StringImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| It's Cold Here!Read city names with integer temperatures, one per line, and print the name of the city with the lowest temperature. | Easy2 | ImplementationArray+2 | No attempts yet | 1s | 128 MB | Judgeable |
| I Speak TXTMSGRead lines until TTYL, map each known short form through a fixed table, and echo other lines unchanged. | Easy2 | Hash mapString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Anagram CheckerDecide whether two phrases are anagrams, ignoring spaces and letters only. | Easy2 | Hash mapString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Snow CallsConvert each alphanumeric phone number to digits, keep the first 10 digits, and print them in xxx-xxx-xxxx form. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Smile with SimilesGiven up to five adjectives and five nouns, print every phrase of the form "<adjective> as <noun>" in nested input order. | Easy2 | ImplementationBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Simple EncryptionRemove non-letters from a message and shift each letter within its column by the alphabet position of the keyword letter above it. | Easy2 | StringSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| TridentPrint an ASCII trident with t tine rows, a crossbar, and h handle rows, using spacing s between the tines. | Easy2 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 0123456789Read one digit from 0 to 9 and print it as a seven-segment display drawn with asterisks, three per segment, with no trailing whitespace. | Easy2 | ImplementationSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| AmeriCanadianRead words one per line until the line quit!, and for each word rewrite a trailing consonant followed by or as our when the word has at least five letters. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Dressing UpRead an odd height H and print a bow tie of H rows where each side widens as rows approach the middle. | Easy2 | ImplementationSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Shift LettersFor each test case, rotate the letters of a word right by n positions and print the result in a fixed sentence format. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| AnagramsGiven two lowercase words, decide whether one can be rearranged into the other, and print the result with the words. | Easy2 | StringHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| StringCollapse every run of identical consecutive letters in a lowercase string into a single letter and print the result. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| NonogramGiven a grid of black and white squares, print the lengths of the consecutive black blocks in each row and then each column. | Easy2 | ImplementationArray+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| Hidden Roman NumeralsFind which of the twelve Roman numerals from 1 to 12 appear as substrings of a given string over {I,V,X}. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 1024 MB | Judgeable |
| Counting SheepCount how many words in each list match the string "sheep" exactly, case-sensitive, and print the count per list with blank lines between cases. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| EntropyRead one line of text, count how often each character appears, and print the Shannon entropy rounded to three decimals. | Easy2 | Hash mapMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| ExpressionGiven N, build a fully parenthesized NAND (Sheffer stroke) expression for the carry-out bit by iterating a fixed string concatenation rule. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Programming Contest PasswordsFor each test case, read a word list and participant index sequences, then print each password formed by concatenating the indexed words. | Easy2 | ImplementationArray+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Stacked BowlsGiven a string of parentheses, compute the total stack height where the first bowl adds 10 and each following bowl adds 5 if it matches the previous direction or 10 if it differs. | Easy2 | StringSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Jumbled WordsFor each line of lowercase words, keep the first and last letter of every word and reverse the letters in between. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| MP3 SongsRead several lists of tune names and print each list sorted alphabetically while ignoring case and keeping input order for ties. | Easy2 | SortingString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| How Many Distinct LettersFor each line until the terminator '#', count how many distinct alphabet letters appear, ignoring case and non-letters. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| DivisibilityGiven a base-62 string, decide whether the number it represents is divisible by 61. | Easy2 | MathNumber theory+1 | No attempts yet | 1s | 128 MB | Judgeable |
| JokeCount how many times the substring 'joke' appears in the input text, with line breaks treated as part of the text. | Easy2 | StringImplementation | No attempts yet | 2s | 128 MB | Judgeable |
| Huffman TreeGiven Z characters and arity N, decode the stored digit string into the per-character encoding. | Easy2 | TreeString+1 | No attempts yet | 3s | 128 MB | Judgeable |
| A Cat on a KeyboardGiven a text, replace each character with the keyboard row number (1 to 5) where its key sits. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Ant NamesGiven up to 100 lowercase names, print the maximum number of distinct letters found in any single name. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Rhyming VersesCount pairs of lines with the same number of vowels and identical last k letters ignoring spaces. | Easy2 | StringImplementation | No attempts yet | 1s | 512 MB | Judgeable |
| Hidden NumberSum every maximal run of digits in a word of letters and digits, ignoring leading zeros. | Easy2 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Caesar CipherDecode a Caesar-shifted uppercase message by matching its most frequent letter to the given original letter. | Easy2 | StringArray+1 | No attempts yet | 1s | 512 MB | Judgeable |