Problems
Pick a problem and write your solution in the built-in editor. The judge runs it against real test cases while you watch, and the wider archive is open to read whenever you like.
Total results1,787 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| PeriodFor every prefix of a string, find the largest exponent K such that the prefix equals some string A repeated K times, using KMP failure function. | Medium4 | String matchingString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Common SubsequenceCompute the length of the longest common subsequence of two given strings for multiple test cases. | Medium4 | Dynamic programmingString | No attempts yet | 1s | 128 MB | Judgeable |
| Guess the NumbersDetermine whether some permutation of up to 5 given values assigned to the unknowns in a fully parenthesized arithmetic expression makes it evaluate to a target result. | Medium4 | Brute forceRecursion+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Molecular FormulaParse a nested molecular formula with repetition counts and atomic weight lookups to compute total molecular weight, or report UNKNOWN. | Medium4 | RecursionString+1 | No attempts yet | 3s | 128 MB | Judgeable |
| Pizza HawaiiFor each local ingredient and native ingredient, output the pair when the two words appear on exactly the same set of pizza names. | Medium4 | Hash mapSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Touchscreen KeyboardGiven a typed word and a list of same-length dictionary words, print each with its keyboard Manhattan distance, sorted by distance then lexicographically. | Medium4 | StringSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| DigitsGiven a huge decimal number, repeatedly replace it with its digit count and report the first step where the value stops changing. | Medium4 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| TautologyGiven propositional formulas in Polish notation, decide for each whether it is a tautology by parsing and evaluating it over every truth assignment. | Medium4 | StringRecursion+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Basic ModuloRead base-b numbers p and m, with p up to 1000 digits, and print the remainder of p divided by m in base b. | Medium4 | MathNumber theory+2 | No attempts yet | 1s | 128 MB | Judgeable |
| System of Linear EquationsParse two linear equations and report each unknown as a reduced fraction, or as don't know when it is not uniquely determined. | Medium4 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Crypt Kicker IIOne input line is the pangram 'the quick brown fox jumps over the lazy dog' encrypted by a letter substitution; find it, build the table, and decrypt every line. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| A Smart Brain is a Tasty BrainParse each of up to 10000 Boolean expressions, evaluate it, and report whether the brain's given answer matches. | Medium4 | StringStack+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Symbolic Logic MechanizationParse a prefix logic formula, report the first syntax error left to right, then classify it as a tautology, contradiction, or contingent. | Medium4 | StringRecursion+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Tribute (Editor)Simulate a buggy modal editor: given keystrokes, apply insert, delete, duplicate, reverse, and cursor commands, then print the buffer with a caret marking the cursor position. | Medium4 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Grade School MultiplicationFormat a grade-school multiplication display column by column, handling zero digits in the second operand and single-line answers. | Medium4 | StringSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Linear PachinkoFor each linear Pachinko string, compute the percentage chance that a ball dropped on a uniformly random character exits through a hole or off an end, truncated to an integer. | Medium4 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Frugal SearchGiven a word list and queries of bar-separated terms with unsigned, plus, and minus letters, output the lexicographically smallest matching word or NONE for each query. | Medium4 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Instruens FabulamRead a header specifying each column's alignment, then print each table with borders, sized columns, and aligned cells. | Medium4 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Automatic EditingApply a fixed list of find-and-replace rules in order, repeatedly replacing the first occurrence of each find string until it no longer appears, and print the final text. | Medium4 | StringSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Equation ElationRepeatedly reduce an arithmetic expression on the left of an equals sign by performing one operation at a time in precedence order, printing each intermediate line. | Medium4 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| DNA TranslationFor each DNA strand, try all four readings (forward, reverse, complement, reverse complement), translate the first AUG to the first stop codon, and print the lexicographically greatest valid protein or a failure message. | Medium4 | StringSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Letter Sequence AnalysisRead a text block to EOF and, for each sequence length 1 to 5, list the five most frequent letter sequences with alphabetized ties. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Witness Redaction PlanReplace every character of each sentence that contains a sensitive word (case-insensitive) with @, keeping the rest of the message unchanged. | Medium4 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Shrew-ologyGiven per-trait dominance rules and adult shrews with sex and trait bits, list every mother-father pair that could produce each juvenile. | Medium4 | Brute forceImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| User NamesGenerate unique lowercase user names from full names using fixed truncation and numeric suffix collision rules, printing each result. | Medium4 | StringHash map+2 | No attempts yet | 3s | 256 MB | Judgeable |
| Set-Theoretic Number NotationParse two numbers given as von Neumann ordinal sets, add their values, and print the sum in the same nested-brace notation. | Medium4 | StringRecursion+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Shortest PrefixesFor each word in a list, find the shortest prefix that matches only that word, counting an exact match as unique even if longer words share it. | Medium4 | TrieString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Shake, Rattle and RollFill a square grid with an uppercase message plus padding letters, then apply the key's sequence of shake, rattle, and roll operations and print the final flat string. | Medium4 | SimulationMatrix+2 | No attempts yet | 1s | 128 MB | Judgeable |
| CompressGiven pairs F and R with F < R, print F and the shortest compressed form C that decodes back to R. | Medium4 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Spreadsheet Circular ReferenceGiven spreadsheet cell formulas as lines, decide for each defined cell whether evaluating it leads to a circular reference, printing the cell name and circular or ok. | Medium4 | GraphDFS+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Stable StringGiven a string of braces, find the minimum number of single-character flips that make all brackets correctly balanced. | Medium4 | StackGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| A Tale from the Dark Side of the MoonReimplement a lost text filter that applies four ordered string rules per line, including conditional ei to ie and dd to p replacements, stopping at a line reading EOF. | Medium4 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Wooden BlocksGiven a string of digit pieces, check whether it forms a valid interlocking arrangement starting with piece 1, ending with piece 2, and matching every adjacent edge pair. | Medium4 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Flatten the ExpressionParse a recursively repeated bracketed expression and print its flattened string without spaces. | Medium4 | StringRecursion+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Phone ListGiven a list of distinct phone numbers, decide whether any number is a prefix of another. | Medium4 | TrieString+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Web PagesFor each line of HTML-looking text, decide whether every opening tag has a matching closing tag and all tags nest properly. | Medium4 | StackString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Risk AssessmentScore each company from text by applying sentence modifiers to quality words and attributing words to the most recent company name. | Medium4 | StringSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Presentation ErrorNormalize two strings by case, spacing around special symbols, bracket and comma/semicolon equivalence, then decide if they match. | Medium4 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Stump SpeechGiven scored key phrases and a speech, sum each phrase's score times its number of occurrences in the speech. | Medium4 | StringString matching+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Breaking the Vigenère CipherFrom a ciphertext, collect all repeated 3-letter groups and their occurrence distances, then report every key length from 4 to 20 dividing at least 90% of those distances. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Next PermutationGiven an integer A, find the smallest permutation of its digits that is strictly greater than A, or print USELESS if none exists. | Medium4 | ArrayString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| SignboardCount how many of the given strings contain the store name as an equally spaced subsequence, where each string counts at most once. | Medium4 | StringBrute force+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Product Order TotalsSum the order quantities for each distinct product name, then print each product with its total sorted by name length, then alphabetically. | Medium4 | Hash mapSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Car Plates CompetitionDecide whether Isa's 7-character plate is a legal plate newer than Martin's by at most C positions ahead in the ACM sequence. | Medium4 | ImplementationMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| ScrabbleGiven a tray of T letters (some blanks that score 0) and an alphabetized dictionary, pick the highest-scoring dictionary word formable from the tray, breaking ties alphabetically. | Medium4 | StringGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Word PowerFor each of N cow names, count how many of M good strings appear as a case-insensitive subsequence of the name. | Medium4 | StringTwo pointers+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Word GamesGiven a rack of up to 10 letters with wildcards and a dictionary of up to 50000 words, print every dictionary word whose letters can be covered by the rack, in input order. | Medium4 | ImplementationBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| L-I-N-G-OGiven a secret five-letter word and guesses, print one feedback line per guess using upper-case for exact matches, lower-case for misplaced letters, and periods otherwise. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Number Base ConversionConvert a number given in one base to another base, where digits run 0-9, A-Z, a-z, and print a blank line after each conversion. | Medium4 | MathString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Mutilated Morse Code CipherApply Ohaver's symmetric Morse cipher: encode each message to dot-dash with a length string, reverse the lengths, and decode back to text. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Microprocessor SimulationSimulate a 4-bit microprocessor from a 256-word hex memory dump and print the final memory state when the stop instruction runs. | Medium4 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Scramble SortSort words case-insensitively and integers numerically within each comma-separated list while keeping each element's original type position. | Medium4 | SortingString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| KeywordsGiven keyword profiles with a gap threshold and a list of titles, report for each profile the numbers of titles where some pair of its distinct keywords appears within the threshold. | Medium4 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Numerically SpeakingTranslate between lowercase words of length 1 to 20 and their bijective base-26 numbers, printing output in a padded two-column format. | Medium4 | MathString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Octal FractionsRead octal fractions from 0 to 1 and print each one's exact decimal value, with trailing zeros stripped. | Medium4 | MathString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Volleyball StatsParse volleyball play-by-play lines, track kills, errors, hits, blocks, and digs per player and team, and print formatted reports on demand. | Medium4 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Excuses, Excuses!Find the excuses containing the most keyword occurrences, where keywords match case-insensitively and only as whole words. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Identifying Legal Pascal Real ConstantsClassify each candidate line as a legal Pascal real constant or not, following the syntax rules for digits, decimal points, scale factors, and signs. | Medium4 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| CowculationsFor each tablet, simulate three operations (add, shift right, shift left, or null) on a five-symbol cow number and check the padded result equals the eight-symbol line. | Medium4 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Bingo, Really?!Split the input into letter-only words, count distinct words per game ending at BULLSHIT, and print the running average as an irreducible fraction. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Etaoin ShrdluConcatenate each sample's lines, count overlapping adjacent character pairs, then print the five most frequent digrams with their counts and rounded relative frequencies. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| CompromiseFor each pair of word lists terminated by #, print the lexicographically smallest longest common subsequence of words. | Medium4 | Dynamic programmingString | No attempts yet | 1s | 128 MB | Judgeable |
| Digital DisplayRender each input time as a seven-segment digital clock face 29 characters wide and 7 rows tall, then print end after all times. | Medium4 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Intriguing IdentifiersValidate each given identifier as a Czech Personal ID for a birth between 1920 and 2009, and report the gender or mark it invalid. | Medium4 | ImplementationString+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Emag eht htiw Em PlehGiven White and Black piece lists, print the 8x8 chess board as ASCII art with alternating light and dark square fills. | Medium4 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| English Number TranslatorParse English number words such as 'one thousand five hundred' into their integer value, handling negatives and an empty-line terminator. | Medium4 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| R.Ø.L.P. Code WheelFor each encoded message, try all 42 wheel shifts and print every decoding that contains the substring RØLP. | Medium4 | StringBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Parsing Real NumbersGiven T lines, decide whether each line is a valid real number with optional sign, decimal point, and exponent, allowing surrounding blanks. | Medium4 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Expression EvaluatorEvaluate a C-style expression of letter variables with binary + and -, plus pre and post ++ and --, then report the result and each used variable's final value. | Medium4 | StringSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| From Prefix to PostfixTranslate each prefix arithmetic expression over + and - into its equivalent postfix form, stopping at the terminating 0. | Medium4 | StackTree+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Attack of the CipherTextsGiven one plaintext/ciphertext pair, invert the letter substitution to decrypt a second ciphertext, printing a period for undetermined characters. | Medium4 | Hash mapString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Year 2000Read n lines of text and expand the two-digit year in every date that matches one of three fixed formats, leaving all other characters unchanged. | Medium4 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Common WordsFor each data set, count word frequencies, find the k-th most common words, and print them alphabetically after a title line. | Medium4 | Hash mapSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| LotteryInsert parentheses into arithmetic expressions so that multiplication is grouped before addition and subtraction, keeping the original spaces. | Medium4 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Divisibility by 11Apply Dodgson's divisibility-by-11 test to numbers up to 50 digits, printing each intermediate value and the final verdict. | Medium4 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| When in Rome...Parse two Roman numerals, add them, and print the sum as a Roman numeral, or CONCORDIA CUM VERITATE when the sum exceeds 1000. | Medium4 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Where's Waldorf?Given a grid of letters and a list of words, find the first-letter position of each word along any of eight straight directions, or the bottom-right cell if absent. | Medium4 | ArrayString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Double TroubleGiven an encrypted ciphertext formed by shifting letters and reversing blocks of size m, find the shift s and block size m that make a given crib appear. | Medium4 | StringBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Weather ForecastingParse four weather forecast lines, score each sentence by phenomenon and qualifier, weight forecasts by day, and test whether the total is under 0.25. | Medium4 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| GeopeitusExpand each variable's value list, substitute every combination into the coordinate formula, and print each resulting coordinate in the specified digit order. | Medium4 | ImplementationBrute force+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| Meli kalikamakaApply syllable and letter substitution rules to convert a lowercase text into a Polynesian-style pronunciation. | Medium4 | StringSimulation+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| Substring ReversalGiven an original string and the result of reversing one substring of length at least two, find the reversed segment, preferring the smallest start then end. | Medium4 | StringTwo pointers | No attempts yet | 1s | 1024 MB | Judgeable |
| Ancient CipherGiven two equal-length strings of capital letters, decide whether the first can be obtained from the second by a substitution cipher followed by a permutation. | Medium4 | StringSorting+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Chemical ReactionsParse chemical formulas with nested parentheses and multipliers, then compare element counts between the left side and each candidate right side. | Medium4 | StringStack+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Buffer ManagerGiven buffer states (free, digit worthiness, or locked) in a string, find the starting position of the K-length window without locked buffers whose digit sum is smallest. | Medium4 | Sliding windowPrefix sum+2 | No attempts yet | 1s | 128 MB | Judgeable |
| ImprovisationGiven a chord progression and a melody with pauses, remap each played note to the nearest note in the current chord's scale, advancing the chord every fourth position. | Medium4 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| ROT13Given a list of lowercase words, count ordered pairs (w1, w2) from the list where w2 equals the ROT13 encoding of w1. | Medium4 | Hash mapString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Summing JaśAdd up to 100 signed decimal numbers with up to 100 digits on each side of the comma and print the shortest form of the sum. | Medium4 | StringMath+1 | No attempts yet | 1s | 512 MB | Judgeable |
| Guess the WordGiven each uppercase word, output the next distinct arrangement of its letters in dictionary order, or the word itself when it is already last. | Medium4 | StringSorting | No attempts yet | 1s | 128 MB | Judgeable |
| OulipoCount overlapping occurrences of a pattern W in a text T over uppercase letters for each test case. | Medium4 | String matchingString | No attempts yet | 1s | 128 MB | Judgeable |
| Mixing WordsDecide whether the third word interleaves the first two words while keeping each word's letter order. | Medium4 | Dynamic programmingString | No attempts yet | 1s | 256 MB | Judgeable |
| Special JudgeDecide whether the given string appears as a contiguous block in both A and B. | Medium4 | String matchingString | No attempts yet | 1s | 128 MB | Judgeable |
| Password ValidationDecide whether each password meets length, character mix, repeat, palindrome, and forbidden subsequence rules. | Medium4 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| CasinoFind every longest palindromic substring of length at least 2 in each string and print them rightmost first. | Medium4 | StringString matching | No attempts yet | 1s | 128 MB | Judgeable |
| CalculatorEvaluate up to 100 polynomials given as compact strings with omitted coefficients at integer X and print each result. | Medium4 | StringMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Exact Sum of Real NumbersAdd each group of decimal numbers with up to 30 digits exactly and print the unrounded sum with trailing zeros removed. | Medium4 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Word ExtractionClean each input line by lowercasing it, joining or splitting words at punctuation by neighbor rules, then print the sorted unique words per line. | Medium4 | StringSorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Fib InverseGiven Fibonacci numbers, find each one's index, taking the larger index when two match. | Medium4 | MathHash map+1 | No attempts yet | 1s | 512 MB | Judgeable |
| Uncompressing Compressed WordsExpand each nested compressed word by concatenating its parts and repeating the group n times. | Medium4 | RecursionStack+1 | No attempts yet | 1s | 256 MB | Judgeable |
| RunesFind the smallest digit that replaces every question mark so the addition, subtraction, or multiplication equation holds. | Medium4 | Brute forceString+1 | No attempts yet | 5s | 256 MB | Judgeable |