Curated sets
Strings and text
Parsing, matching, and tries.
Total results1,816 problems
| Topics | Judge | |||||
|---|---|---|---|---|---|---|
| KaraokeCount the starting positions where the next K characters of the song string are all vowels. | Easy2 | Sliding windowString | No attempts yet | 2s | 128 MB | Judgeable |
| Palindrome ColoringSplit each A/B string into the fewest palindromic subsequences and output that count. | Easy2 | StringTwo pointers | No attempts yet | 1s | 128 MB | Judgeable |
| Molar MassThe program parses each formula of C, H, O, and N with optional atom counts and prints its molar mass using the given weights. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Careless AdditionAdd two integers digit by digit from the right with no carries and print the column sums in order. | Easy2 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| DecryptionCount the letters in each sentence ignoring spaces and print the most frequent one, or ? on a tie. | Easy2 | ArrayString | No attempts yet | 1s | 128 MB | Judgeable |
| War GameGiven each opponent row of archers, lancers, and riders with cyclic strengths, output the shortest row that beats every soldier in meeting order. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Addition in Different BasesAdd two numbers of up to 1000 digits in bases 1 to 35, including unary base 1, and print each equation with its sum in the same base. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Air speed of a fully laden swallowYou group messy swallow flight records by subspecies and compute two average speeds for each group. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Pig LatinConvert each word to Pig Latin by moving leading consonants to the end and appending ay. | Easy2 | StringSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| W**h y**r mouth out with s**pReplace the middle two letters of every four-letter run whose first and last letters match the given list, scanning each line left to right with no overlap. | Easy2 | StringSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Word LadderDecide for each test case whether every consecutive word pair has equal length and differs in exactly one letter. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Morse CodeDecode each test case of five space-separated Morse codes into five uppercase letters or digits. | Easy2 | Hash mapString | No attempts yet | 1s | 128 MB | Judgeable |
| Arbiter LoginGiven the original and entered passwords, report login success or hint at a caps lock or num lock mistake. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Arrangement of ContestCount the titles that form the longest unbroken run from A onward, using each title's first letter and stopping at the first missing letter. | Easy2 | GreedyString+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Word SearchingCount case-sensitive overlapping occurrences of a given word, each fully inside one line of the following text. | Easy2 | String matchingString | No attempts yet | 1s | 128 MB | Judgeable |
| Jane's First WordsCheck each input word against the pattern da+dd?(i|y) and print whether Jane called for daddy or is cooing. | Easy2 | String matchingString | No attempts yet | 1s | 128 MB | Judgeable |
| Easy EncryptionEach letter becomes its two-digit code and each digit gains a # prefix while other characters stay unchanged. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Length and Frequency of SentencesCount the words in each of N sentences and report how often each length occurs in ascending order. | Easy2 | StringHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Form GuideParse home and away scorelines into win, draw, and loss marks, print the overall, home, and away form strings, and report the longest run of each mark. | Easy2 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| CipherDecrypt a Caesar-shifted message by trying all 26 shifts and picking the one where both CHIPMUNKS and LIVE appear. | Easy2 | Brute forceString | No attempts yet | 2s | 512 MB | Judgeable |
| Mingyun's PasswordFind the word whose reverse also appears in the list and print its length and middle letter. | Easy2 | StringBrute force | No attempts yet | 1s | 128 MB | Judgeable |
| Word PuzzleDecide for each pair of strings whether the gathered letters can be rearranged to form the original word. | Easy2 | Hash mapString | No attempts yet | 3s | 256 MB | Judgeable |
| Cedric's cypherDecrypt each Caesar-ciphered line using the trailing encrypted A to recover the shift and drop that marker. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| The Hardest Problem EverDecode each START/END block by shifting every uppercase letter five places back and leaving other characters unchanged. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Finding NemoPrint Found for each input line before EOI when the letters n, e, m, o appear in order ignoring case, else Missing. | Easy2 | String | No attempts yet | 1s | 256 MB | Judgeable |
| Palindrome LinesDecide for each of n short lines whether it reads the same forward and backward, ignoring letter case. | Easy2 | Two pointersString | No attempts yet | 1s | 256 MB | Judgeable |
| Word SwapSum the per-position letter differences between each pair of equal-length words and report the coins earned, paid, or free. | Easy2 | ImplementationString | No attempts yet | 1s | 256 MB | Judgeable |
| Odysseus and the SirensThe program scores every melody under each candidate key by summing note penalties and prints the numbered key with the smallest total. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Amino AcidParse each formula into element counts and print the molecular weight, or Invalid formula for other elements. | Easy2 | StringImplementation | No attempts yet | 1s | 64 MB | Judgeable |
| HeadshotAfter a click on a circular cylinder, compare firing at once against spinning first and print which choice is safer. | Easy2 | ProbabilityString | No attempts yet | 1s | 64 MB | Judgeable |
| Radix 32 ConversionConvert each base-32 string of up to 8 digits to its decimal value and to binary by expanding every digit to 5 bits. | Easy2 | MathString | No attempts yet | 1s | 64 MB | Judgeable |
| Pangram CheckerCount how many times each English letter appears in every sentence and print its pangram grade. | Easy2 | StringHash map | No attempts yet | 3s | 256 MB | Judgeable |
| The return of the KingSplit the digit string into grades of 1 to 10 in the single valid way and print the average rounded to two decimals. | Easy2 | StringGreedy | No attempts yet | 1s | 256 MB | Judgeable |
| Working HoursAdd signed hour and minute terms in a flexible format and print each total as H:MM. | Easy2 | ImplementationString+1 | No attempts yet | 2s | 256 MB | Judgeable |
| RövarspråketTranslate one lowercase word by expanding each consonant into three letters under the given vowel and consonant rules. | Easy2 | ImplementationString | No attempts yet | 1s | 256 MB | Judgeable |
| Comma Separated SumAdd all the natural numbers listed in the comma-separated string S. | Easy2 | StringMath | No attempts yet | 1s | 256 MB | Judgeable |
| Veni, vidi, viciDrop the last letter of each odd-length ciphertext, then decode every letter pair into one plain letter with the given key. | Easy2 | StringMath | No attempts yet | 1s | 256 MB | Judgeable |
| Spring 2005: Arriving at USCFilter the building list to names that hold the abbreviation letters as a case-insensitive subsequence and print the matches in input order. | Easy2 | Two pointersString matching | No attempts yet | 1s | 256 MB | Judgeable |
| Pattern Word BankingAdd the PIN digits picked by lowercase pattern letters and print non sequitur if the letter values do not match the PIN length. | Easy2 | SimulationString | No attempts yet | 2s | 256 MB | Judgeable |
| Kkung's Girlfriend PlanEach test case gives named condition times and AND-OR combos, and the answer is the smallest combo time where one combo takes its slowest condition. | Easy2 | ImplementationHash map+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Letter CookiesGiven the letters in a box, decide for each query word whether its letters can all be taken from the box. | Easy2 | Hash mapString | No attempts yet | 1s | 256 MB | Judgeable |
| Is It a Number?Check whether each line holds only digits with optional surrounding spaces and print the number without leading zeros or invalid input. | Easy2 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Decode the MessageThe program decodes each word into one character from its letter values modulo 27. | Easy2 | StringMath+1 | No attempts yet | 1s | 256 MB | Judgeable |
| PasswordCheck whether the two letters typed into the blanked positions of a stored answer match the letters at those positions, ignoring spaces. | Easy2 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| CypherDecrypt each message line by shifting its lowercase letters back by the Caesar shift computed from its date. | Easy2 | StringMath | No attempts yet | 1s | 256 MB | Judgeable |
| Coverity CrosswordDecide whether every listed word appears horizontally, vertically, or diagonally in an 8 by 8 letter grid. | Easy2 | String matchingMatrix+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Eakspay igpay atinlay?Translate each phrase into Pig Latin by moving each leading consonant cluster to the end with ay, or adding yay after vowel-initial words. | Easy2 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Hash Code HackerThe program prints k distinct letter strings that share one Java hash code by mapping binary digits to Aa and BB blocks. | Easy2 | StringImplementation | No attempts yet | 2s | 256 MB | Judgeable |
| Spin the number wheelCount the wheel positions where the M digits read clockwise form a number between X and Y. | Easy2 | Brute forceString | No attempts yet | 1s | 256 MB | Judgeable |
| Hidden PasswordDecide if scanning the message and skipping letters outside the remaining password set reproduces the password in order. | Easy2 | SimulationString | No attempts yet | 1s | 256 MB | Judgeable |
| Marko's T9 inputCount how many dictionary words map letter by letter to the given T9 digit string. | Easy2 | StringHash map | No attempts yet | 2s | 64 MB | Judgeable |
| Identifying Map TilesConvert a map tile quadkey into its zoom level and x and y coordinates. | Easy2 | Bit manipulationString | No attempts yet | 1s | 256 MB | Judgeable |
| YODACompare two numbers digit by digit from the right and drop the smaller digit at each position, printing YODA for a number left with no digits. | Easy2 | StringSimulation | No attempts yet | 1s | 64 MB | Judgeable |
| Lazy Spelling Bee (Large)Count distinct words formed by picking each letter from its neighbors in the target word, modulo 1e9+7. | Easy2 | CombinatoricsString+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Moist (Small1)For each deck of names, count how many cards the robot moves to sort the deck into lexicographic order. | Easy2 | ArrayString | No attempts yet | 5s | 512 MB | Judgeable |
| Hangul Initial ConsonantsPrint the initial consonant of each Hangul syllable in the given string in order. | Easy2 | MathString+1 | No attempts yet | 1s | 512 MB | Judgeable |
| #include <Google I/O.h>Decode each block of eight I and O letters as one ASCII byte and print the message for every test case. | Easy2 | ImplementationString+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Read Phone Number (Small)Split each digit string into the given group lengths and read each run of equal digits with count words such as double and triple. | Easy2 | SimulationString+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Fair and Square (Small)Count numbers in each interval [A, B] that are palindromes and squares of palindromes. | Easy2 | Brute forceMath+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Reverse Word OrderGiven N lines of space-separated words, print each line's words in reverse order prefixed with the case number. | Easy2 | StringImplementation | No attempts yet | 5s | 512 MB | Judgeable |
| Reverse Words (Large)Read each line of words and print the words in reverse order, prefixed by the case number. | Easy2 | StringImplementation | No attempts yet | 5s | 512 MB | Judgeable |
| T9 Spelling (Small)Map each letter of a short message to its keypad digit and repeat count, inserting a space between consecutive letters that share the same key. | Easy2 | StringImplementation+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Immigrate to the CTP principalityConvert each item between uppercase letters and their alphabet positions (A=1 to Z=26), in the direction given by the mode character. | Easy2 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Bitwise Operations on Binary NumbersGiven two equal-length binary strings, output their bitwise AND, OR, XOR, and the complemented forms of each, keeping length and leading zeros. | Easy2 | StringBit manipulation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| CamerasRead n eight-character plates and print each one that matches a fixed pattern of digits and a capital letter, in input order. | Easy2 | StringImplementation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Adding god to nicknamesGiven N nicknames split into syllables by spaces, replace the first syllable with god and print the result. | Easy2 | StringImplementation | No attempts yet | 1s | 512 MB | Judgeable |
| PalindromeGiven a lowercase word of at most 20 characters, decide whether it reads the same forwards and backwards. | Easy2 | StringTwo pointers+1 | No attempts yet | 2s | 512 MB | Judgeable |
| A New AlphabetReplace each English letter with its fixed symbol string from a 26-entry table, leaving all other characters unchanged. | Easy2 | StringHash map+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Quick EstimatesRead N integers up to 10^100 and print the number of digits in each, counting 0 as one digit. | Easy2 | StringMath+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Math ContestGiven a huge decimal integer x, print YES if x is divisible by 9 and NO otherwise. | Easy2 | Number theoryMath+1 | No attempts yet | 1s | 512 MB | Judgeable |
| Four Arithmetic OperationsEach line gives an expression a op b = c with single-digit spacing, and you print correct or wrong answer depending on whether the arithmetic matches the claimed result. | Easy2 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Boys and GirlsArrange n children in a circle with B/G so that exactly x stand next to a boy and exactly y next to a girl, output the lexicographically smallest. | Easy2 | ImplementationBrute force+1 | No attempts yet | 2s | 256 MB | Judgeable |
| The Funniest Digital LaughterGiven a string, ignore the consonants and decide whether the remaining vowels read the same forwards and backwards. | Easy2 | StringTwo pointers | No attempts yet | 1s | 512 MB | Judgeable |
| HolesCount the holes in each of N lines of uppercase text, where B counts as two, A D O P Q R count as one, and the rest count as zero. | Easy2 | StringImplementation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| VirusGiven a key and one line of ciphertext, undo a Caesar variant whose shift grows by one per letter and resets after 25. | Easy2 | StringSimulation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Alpha PuzzleAssign numbers 1 to 26 to letters by scanning the grid and numbering each letter at its first appearance. | Easy2 | SimulationString+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Luhn AlgorithmGiven a sixteen-digit card number as a string, check whether it passes the Luhn checksum and print DA or NE. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Bridge Honor PointsGiven N strings of 13 card characters, add up honor points (A=4, K=3, Q=2, J=1) across all hands and print the total. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 32 MB | Judgeable |
| Country Leader (Small)For each test case, find the name with the most distinct letters, breaking ties by ASCII alphabetical order, and print it. | Easy2 | StringImplementation+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Country LeaderFor each test case, pick the name with the most distinct letters, breaking ties by lexicographic order where a space sorts before any letter. | Easy2 | StringSorting+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Refreshment AreaCount the number of D-long horizontal or vertical runs of empty cells in an N by M grid. | Easy2 | ArrayImplementation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Birthday GraphRead dates in dd mm yyyy form and print a star per birthday for each of the twelve months, in a numbered case format. | Easy2 | ArrayString+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Grid PatternFor each case, print a text grid with pipe, minus, and plus lines and asterisk-filled cells of size w by h. | Easy2 | ImplementationSimulation+1 | No attempts yet | 10s | 512 MB | Judgeable |
| X X gluedFor each registration number, print every run of two or more identical digits in the four-digit group, in left-to-right order. | Easy2 | StringImplementation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Hongjun surrounded by fansGiven Hongjun's id, print a 3 by 3 grid of emoticons with :id: in the center and :fan: in the other eight cells. | Easy2 | ImplementationString | No attempts yet | 1s | 64 MB | Judgeable |
| EmpathyMultiply two binary numbers up to 30 bits long and print the product in binary without leading zeros. | Easy2 | MathString+2 | No attempts yet | 2s | 256 MB | Judgeable |
| Credit Card ValidationFor each 16-digit card number, apply the Luhn checksum (double every second digit from the right, sum digits) and print T if the total is divisible by 10, else F. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| No DuplicatesRead a line of space-separated uppercase words and print yes if no word repeats, or no if any word appears more than once. | Easy2 | StringHash map+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Boolean SatisfiabilityCount the assignments of a disjunction of single literals that make the formula true, where each variable takes true or false. | Easy2 | CombinatoricsMath+2 | No attempts yet | 3s | 512 MB | Judgeable |
| Atomic MassParse a short chemical formula, look up each element's atomic mass, multiply by any following count, and print the total with two decimals. | Easy2 | StringHash map+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Kiwis vs KangaroosGiven a phrase, score each side by how often its letters appear in KANGAROO or KIWIBIRD, then report the higher score or a tie. | Easy2 | ImplementationString+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Beautiful MusicFor each note sequence, check whether every consecutive pair is 2, 4, or 6 steps apart on the repeating 7-note scale, and print one of two messages. | Easy2 | ImplementationString+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Letter CountCount how often each English letter appears in one line, ignoring case and non-letters, then print 26 rows of stars. | Easy2 | StringImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| PiratesGiven a lowercase word, find the letter with the highest frequency and print that letter with its count. | Easy2 | StringHash map+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Password checkFor each of N passwords, report valid if it has a lowercase letter, uppercase letter, digit, symbol, and length at least 12, else invalid. | Easy2 | StringImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| Hissing MicrophoneGiven a lowercase string, check whether it contains two consecutive s characters and print hiss or no hiss. | Easy2 | StringImplementation | No attempts yet | 1s | 512 MB | Judgeable |
| Life ScoreFor each name, sum the letter values (A=1 to Z=26, spaces worth 0) and print the total, or PERFECT LIFE when the total is exactly 100. | Easy2 | StringImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| Big number A+BRead two integers with up to 10000 digits and print their sum without leading zeros. | Easy2 | StringMath+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Check the CheckRead dish names and price-quantity pairs until the line TOTAL, then print PAY if the waiter's total is at most the sum of price times quantity, else PROTEST. | Easy2 | ImplementationString+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Lorem ipsumSplit a fixed Latin placeholder paragraph into words and print the words at indices L through R separated by spaces. | Easy2 | StringImplementation+1 | No attempts yet | 0.1s | 512 MB | Judgeable |