Curated sets
Strings and text
Parsing, matching, and tries.
Total results1,816 problems
| Topics | Judge | |||||
|---|---|---|---|---|---|---|
| Palindrome NumbersFor each integer up to 99999 in a terminated input list, print whether its decimal digits form a palindrome. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Counting VowelsFor each input line until a terminating '#', count how many letters are vowels regardless of case. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| QuackPrint a fixed ASCII-art duck exactly, matching every character and line with no input. | Easy1 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| CrowingPrint a fixed ASCII art rooster with no input, matching the exact spacing and characters. | Easy1 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| Dobby's English StudyFor each line, count how many times a given letter (case-insensitive) appears in a sentence until a line with only '#' ends input. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| HowlPrint a fixed wolf ASCII art picture exactly, with no input and no extra spaces. | Easy1 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| String RepetitionGiven repeat count R and string S, output the string formed by repeating each character of S exactly R times in order. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Typo Man Go ChangyoungGiven a string and a 1-based position, output the string with that one character removed, for multiple test cases. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Word LengthRead a word of at most 100 letters and print its length. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Toggle Alphabet CaseRead a word up to length 100 and print it with every letter's case swapped. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Beautiful NumberFor each given integer, count how many distinct decimal digits it contains. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Study Abroad BanDelete every character in a given uppercase word that appears in the letters of 'CAMBRIDGE' and print the rest. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| FBIGiven five agent codes, print the 1-based positions of those containing the substring FBI, or a fixed message if none do. | Easy1 | StringImplementation | No attempts yet | 0.25s | 128 MB | Judgeable |
| Sum of Missing CharactersFor each string, sum the ASCII values of uppercase letters that never appear in it. | Easy1 | StringHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| The Good and the BadCount the letters g and b in each hero name, ignoring case, and print whether the name is GOOD, A BADDY, or NEUTRAL. | Easy1 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Capitalize the First LetterRead N sentences and print each one with its first letter changed to uppercase, leaving every other character as is. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Line NumbersRead N lines of text and print each one prefixed with its 1-based line number in the format "number. content". | Easy1 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| Mirror, Oh! MirrorRead lines of ASCII text until a line of three asterisks, and print each line with its characters reversed. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Counting LinesRead all input lines, including empty ones, and print how many there are. | Easy1 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| PhD ProgramRead N problems, output a+b for each addition line and 'skipped' for the line P=NP. | Easy1 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| WelcomePrint the three-line ASCII art that spells the word Welcome, matching every space and symbol exactly. | Easy1 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| Call CenterPrint a fixed piece of ASCII art of C3PO sitting at a call center, matching the example exactly. | Easy1 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| Entry Log ManagementRead N names and print each one converted to lowercase, one per line. | Easy1 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| JOI and IOICount how many length-3 windows of a string equal JOI and how many equal IOI, including overlaps. | Easy1 | StringBrute force+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Do-it, Do-it-NotFor each test case, compare the two middle digits of an even-length binary string and print Do-it if they match, otherwise Do-it-Not. | Easy1 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Reverse TextRead each test case line and print its characters in reverse order. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| The Universal OracleGiven one line of text, replace each question's leading 'What' with 'Forty-two' and its final '?' with '.', ignoring non-questions. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| DyslexiaCompare two equal-length letter strings position by position and count the positions where the characters differ, treating case as significant. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| DyslexiaCompare two equal-length strings character by character and count positions where the letters match exactly, including case. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Reverse a Three-Letter WordRead a three-letter word and print its characters in reverse order. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Letter CounterCount how many times each letter appears across the given lines and print nonzero counts from a to z then A to Z. | Easy1 | ArrayString | No attempts yet | 1s | 512 MB | Judgeable |
| Caesar CipherGiven the encrypted message and its original first letter, recover the shift and decode the full message. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| OX QuizScore each O by the length of its unbroken run of O characters and print the total for each test case. | Easy1 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| Letter BankDecide whether the second word uses exactly the letters of the first word, each at least once. | Easy1 | Hash mapString | No attempts yet | 1s | 128 MB | Judgeable |
| First and Last LetterPrint the first and last letter of each given uppercase string, doubling the letter for length 1. | Easy1 | String | No attempts yet | 1s | 128 MB | Judgeable |
| Reverse Each WordFor each of T sentences, print the words in the same order with the letters inside every word reversed. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Erasing a File for GoodDecide if the second bit string is the first with every bit flipped N times, so it must equal the first for even N and its complement for odd N. | Easy1 | SimulationString | No attempts yet | 1s | 128 MB | Judgeable |
| JengaCheck each three-block row for two adjacent missing blocks and report whether each tower stands. | Easy1 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| Grading ExamsCount how many answers differ between the answer key and the student's responses for each test case. | Easy1 | String | No attempts yet | 1s | 128 MB | Judgeable |
| Fraud BustersMatch each 9-character database code against the scanned code, treating every star as a wildcard, and print the matches in input order. | Easy1 | String matchingImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Encoding Binary NumbersEncode each binary string as run lengths followed by digits and print the result per line. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Gray codeConvert an n-bit binary string to its standard Gray code by copying the first bit and adding each adjacent pair of bits without carry. | Easy1 | Bit manipulationString | No attempts yet | 1s | 128 MB | Judgeable |
| Hide those lettersThe program replaces every occurrence of two given letters in both cases with underscores. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| AcronymsGiven an acronym and candidate phrases, print the phrases whose word initials match the acronym letters in order. | Easy1 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Count VowelsCount the vowels a, e, i, o, and u in each given lowercase word and print the result in the required sentence. | Easy1 | String | No attempts yet | 1s | 256 MB | Judgeable |
| Reverse RotReverse each message, then shift every character forward by N places in the 28-symbol alphabet. | Easy1 | StringSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Quite a problemPrint yes for each input line that contains problem in any capitalization, even inside longer words, and no otherwise. | Easy1 | String matchingString | No attempts yet | 2s | 256 MB | Judgeable |
| Happy or SadCount the happy (:-)) and sad (:-( ) emoticons in the message and print happy, sad, unsure, or none. | Easy1 | String | No attempts yet | 1s | 256 MB | Judgeable |
| Vertical ReadingRead five given words column by column from top to bottom, skipping missing letters in shorter words, and print the letters in that order. | Easy1 | SimulationArray+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Find the AlphabetGiven a lowercase word of length at most 100, output the 0-based first index of each letter a to z, or -1 when absent. | Easy1 | ArrayString | No attempts yet | 1s | 256 MB | Judgeable |
| String analysisCount the lowercase letters, uppercase letters, digits, and spaces in each input line until end of input. | Easy1 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Comma Integer CountCount the maximal runs of digits in a comma-separated digit string. | Easy1 | String | No attempts yet | 1s | 256 MB | Judgeable |
| Comma Sum MultilineJoin the input lines into one comma-separated string, split it at commas, and print the sum of the numbers. | Easy1 | ImplementationString | No attempts yet | 1s | 256 MB | Judgeable |
| ??!Print the given id with ??! appended to it. | Easy1 | String | No attempts yet | 1s | 256 MB | Judgeable |
| BASE16 EncodingRead a string of up to 50 letters and digits and print each character as two uppercase hex digits in order. | Easy1 | ImplementationString | No attempts yet | 1s | 256 MB | Judgeable |
| BASE16 DecodingDecode a BASE16 string by converting each pair of hex digits back into its ASCII character. | Easy1 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Vowel CountCount how many letters of the given lowercase word are vowels (a, e, i, o, u). | Easy1 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Palindrome CheckCheck whether the given lowercase word reads the same forward and backward and print 1 or 0. | Easy1 | StringTwo pointers | No attempts yet | 1s | 256 MB | Judgeable |
| Use Every LetterDecide for each of up to 50 sentences whether it contains every letter a to z, and list the missing letters otherwise. | Easy1 | StringArray | No attempts yet | 2s | 256 MB | Judgeable |
| Simon SaysPrint the trailing part of every command that starts with 'Simon says' and skip all other commands. | Easy1 | StringImplementation | No attempts yet | 2s | 256 MB | Judgeable |
| Communication ChannelsCompare each transmitted binary string with its received copy and print OK when they match and ERROR otherwise. | Easy1 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Angry Grammar SticklerThe program counts banned words and phrases in each sentence and prints ten times that count. | Easy1 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Thai Lottery Prize CheckGiven the winning numbers and prize amounts for six Thai lottery categories, compute the total prize for each ticket by adding every matched category. | Easy1 | StringImplementation | No attempts yet | 2s | 256 MB | Judgeable |
| Cryptographer's ConundrumCount the positions where the given string differs from PER repeated to the same length. | Easy1 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Count Me InCount the vowels and consonants in each of up to 100 given English sentences. | Easy1 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| !terces poTReverse every input line except the final END line and print each decoded sentence in order. | Easy1 | String | No attempts yet | 1s | 256 MB | Judgeable |
| The Image Stretched Twice as WideCheck whether doubling every character of the first picture sideways produces the second picture. | Easy1 | ImplementationString | No attempts yet | 1s | 512 MB | Judgeable |
| Concatenate two linesRead two input lines and print their concatenation with nothing inserted between them. | Easy1 | String | No attempts yet | 1s | 256 MB | Judgeable |
| Lining Up by NameCheck whether the given player names stand in increasing or decreasing dictionary order and print INCREASING, DECREASING, or NEITHER. | Easy1 | StringArray | No attempts yet | 1s | 256 MB | Judgeable |
| Affine CipherApply E(X) = (aX + b) mod 26 to each uppercase letter of the plaintext and print the ciphertext. | Easy1 | ImplementationString+1 | No attempts yet | 5s | 256 MB | Judgeable |
| ROT13Encrypt the given string with ROT13, shifting each English letter by 13 places and leaving other characters unchanged. | Easy1 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Sum of digitsAdd N digits given as a single unspaced line and print their sum. | Easy1 | ImplementationString | No attempts yet | 1s | 256 MB | Judgeable |
| Print ten characters per linePrint the given word in chunks of ten characters, one chunk per line. | Easy1 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| EssayPrint B distinct words formed by mapping the decimal digits of 0 to B-1 to letters a to j. | Easy1 | ImplementationString | No attempts yet | 1s | 64 MB | Judgeable |
| NNRepeat the decimal form of N exactly N times and print at most its first M characters. | Easy1 | ImplementationString | No attempts yet | 1s | 32 MB | Judgeable |
| Rulers of Centauri PrimeGiven T country names, report for each whether a king, a queen, or nobody rules it from its last letter. | Easy1 | StringImplementation | No attempts yet | 5s | 512 MB | Judgeable |
| Rulers of Centauri PrimeGiven T country names, print for each whether its last letter marks a king, a queen, or nobody. | Easy1 | StringImplementation | No attempts yet | 5s | 512 MB | Judgeable |
| KBO Korean Series Champion NumberGiven the Korean name of a KBO team that won the Korean Series, print the number assigned to that team. | Easy1 | ImplementationString+1 | No attempts yet | 2s | 512 MB | Judgeable |
| George BooleRead one boolean operation in the form true AND false and print its result. | Easy1 | ImplementationString+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Java2016Given a target constant c, print 20 fixed macro definitions and then build one expression by appending a macro for each set bit of c. | Easy1 | ImplementationSimulation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| HistogramRead n bar sizes and print one line of exactly k equals signs for each bar size k. | Easy1 | ImplementationString | No attempts yet | 2s | 512 MB | Judgeable |
| Tournament SelectionCount wins among six game results and print the group number 1, 2, or 3, or -1 if there are no wins. | Easy1 | ImplementationString | No attempts yet | 2s | 512 MB | Judgeable |
| HelicopterPrint the given ASCII art helicopter exactly as shown, with no trailing spaces on any line. | Easy1 | ImplementationString | No attempts yet | 1s | 512 MB | Judgeable |
| A toast that wins over the roomGiven one of eight fixed Hangul abbreviations joined by periods, print the full Korean toast phrase it stands for. | Easy1 | ImplementationString+1 | No attempts yet | 2s | 512 MB | Judgeable |
| CAPSRead a lowercase string and print every character converted to uppercase. | Easy1 | StringImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| What Is Your Name Score?Given an uppercase name, sum the alphabetical position of each letter and print the total. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Command PromptGiven N equal-length file names, output a pattern where each position is the common character if all names agree there, or a question mark otherwise. | Easy2 | StringImplementation | No attempts yet | 2s | 128 MB | Judgeable |
| Word CountCount the number of space-separated words in a string that may have leading or trailing spaces. | Easy2 | StringImplementation | No attempts yet | 2s | 128 MB | Judgeable |
| Most Frequent LetterCount letter frequencies in a string, case-insensitively, and print the most common letter in uppercase or a question mark on ties. | Easy2 | Hash mapString+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Basketball GameGiven N surnames, count first letters and print all letters (in order) that start at least five surnames, or PREDAJA if none does. | Easy2 | Hash mapImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Word SortingDeduplicate a list of words and sort them first by length, then lexicographically. | Easy2 | SortingString | No attempts yet | 2s | 256 MB | Judgeable |
| Octal to BinaryConvert a huge octal number (up to 333,334 digits) into its binary representation without leading zeros. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Splitting a WordSplit a lowercase word into three nonempty parts, reverse each part, and find the lexicographically smallest concatenation among all splits. | Easy2 | StringBrute force+1 | No attempts yet | 2s | 128 MB | Judgeable |
| House Number SignCompute the total width of a house-number sign given fixed per-digit widths and 1 cm margins between digits and at both ends, for each input number until 0 appears. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Choosing a Team NameCount letters L,O,V,E across a fixed name plus each candidate string, compute a formula mod 100, and print the candidate with the highest value, breaking ties by lexicographic order. | Easy2 | StringImplementation+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Group Word CheckerCount how many of up to 100 lowercase words have every repeated character forming a single contiguous block. | Easy2 | StringImplementation | No attempts yet | 2s | 128 MB | Judgeable |
| Yujin NumberGiven an integer up to about 2.1 billion, determine whether some split of its digits into a left and right part yields equal digit products. | Easy2 | StringBrute force+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Most Frequent LettersCount lowercase letter frequencies across up to 50 lines of text and print all letters tied for the highest frequency in alphabetical order. | Easy2 | Hash mapString+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Sort Digits DescendingRearrange the digits of a given natural number so they appear in descending order and print the result. | Easy2 | SortingString+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Octopus NumbersConvert base-8 strings using nine special symbols (including one for digit -1) into their decimal integer values until a terminator line appears. | Easy2 | StringMath+1 | No attempts yet | 1s | 128 MB | Judgeable |