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 results457 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| 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 |
| 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 |
| EmojiGiven a short message, determine for each line whether it contains the Slack cat emoji expressed as an ASCII shortcode. | Easy1 | StringImplementation+1 | No attempts yet | 1s | 512 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 |
| 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 |
| 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 |
| 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 |
| TimeCount how many clock times from 00:00:00 through N:59:59 contain the digit K at least once. | Easy2 | Brute forceImplementation+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Remainder CalculationFor each test case, find the remainder when a base-B number D with up to ten million digits is divided by B-1. | Easy3 | MathNumber theory+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Choose Your Own AdventureEach page is a node with two outgoing choices or a terminal ending; print the unique path from page 1 to the single HAPPY ending. | Easy3 | GraphDFS+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Casting Out NinesFor each line like a+b=c. or a*b=c., compute digit sums modulo 9 and print PASS if the operation is congruent, otherwise NOT!. | Easy3 | MathNumber theory+2 | No attempts yet | 1s | 128 MB | Judgeable |
| RingsCount how many of N rings, each a 10-letter circular string, contain a given search string when read around the circle. | Easy3 | StringString matching+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Adam's GenesProcess cloning requests in order, tracking each clone's accumulated genes and reporting whether it is consistent and safe, disconnected from Adam, or doubly mutated. | Easy3 | Hash mapSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Global WarmingGiven a sequence of temperatures, find the length of the shortest period of the sequence of consecutive differences, allowing the final repetition to be truncated. | Easy3 | String matchingBrute force+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Numbers That Read the Same Upside DownCount how many integers in the interval [m, n] stay the same when rotated 180 degrees, using the digit map 0, 1, 8, 6, 9. | Easy3 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| SurfingParse links out of HTML pages, print each link, then answer reachability queries between pages. | Easy3 | GraphDFS+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Approximate String MatchingFor each word pair, try every offset, keep the largest count of matching letters, and print twice that count over the total length as a reduced fraction. | Easy3 | String matchingBrute force+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ChromosomeDecide for each uppercase string whether it matches an optional A-to-F letter followed by runs of A, F, and C and an optional closing letter. | Easy3 | String matchingString | No attempts yet | 2s | 64 MB | Judgeable |
| E-CasinoFind the smallest shift k where the observed bits match the public array up to a repeating mask. | Easy3 | String matchingBrute force | No attempts yet | 2s | 512 MB | Judgeable |
| When I miss Korea, I log in to the serverDecide for each of up to 100 file names whether it starts with the pattern prefix and ends with the pattern suffix around the single asterisk. | Easy3 | String matchingString | No attempts yet | 1s | 128 MB | Judgeable |
| Master of copy and pasteHanshin builds a target string by typing one character at a time or pasting a fixed clipboard string, and the task asks for the minimum total time. | Easy3 | GreedyString matching | No attempts yet | 2s | 256 MB | Judgeable |
| KickFind the shallowest and deepest depths at which the reality notes appear as an evenly spaced subsequence of the dream notes. | Easy3 | String matchingBrute force | No attempts yet | 1s | 256 MB | Judgeable |
| One PieceCount how many times a short uppercase pattern N appears as a substring of a longer string H, counting overlapping occurrences. | Easy3 | StringString matching+2 | No attempts yet | 1s | 128 MB | Judgeable |
| IDN Homograph AttackGiven a string, decide whether some character can be swapped for a different character that normalizes to the same form. | Easy3 | StringHash map+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Issuing PlatesFor each of M plates, decide whether any of N bad words appears as a substring after mapping leetspeak digits to letters. | Easy3 | StringString matching+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Cyclic ShiftsGiven a text T and a string S, decide whether T contains any cyclic shift of S as a contiguous substring. | Easy3 | StringString matching+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Document SearchGiven a document and a word, find the maximum number of non-overlapping occurrences of the word within the document. | Medium4 | String matchingGreedy+1 | No attempts yet | 2s | 128 MB | Judgeable |
| String SearchImplement KMP string matching to count and list all 1-indexed starting positions where pattern P occurs in text T of length up to 1,000,000. | Medium4 | String matchingString | No attempts yet | 2s | 256 MB | Judgeable |
| Writing Consecutive Numbers 3Given N, find the earliest 1-based index where the digit-string of N occurs inside the concatenation of integers 1 through N. | Medium4 | String matchingString+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Drawing PolygonsGiven a reference closed-path digit sequence tracing a polygon, find which candidate sequences represent the same polygon allowing rotation of starting point and direction reversal but not geometric rotation or reflection. | Medium4 | String matchingString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Remaining Letters in a Word SearchGiven a letter grid and a word list, find every 8-direction occurrence of each word, cross out those letters, and print the remaining letters in row-major order. | Medium4 | MatrixString matching+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Radio TransmissionGiven a received string that is part of a repeated broadcast, find the length of the shortest repeating unit using KMP failure function. | Medium4 | String matchingString | No attempts yet | 1s | 128 MB | Judgeable |
| Search by templateParse a pattern with literal letters, wildcards, and allow/forbid letter groups, then find all positions where it matches inside a large text. | Medium4 | String matchingString+1 | No attempts yet | 2s | 128 MB | Judgeable |
| 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 |
| HumidexGiven any two of temperature, dew point, and humidex per line, compute and print the third rounded to one decimal. | Medium4 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| TreadmillScan a sample stream for chirp bit patterns and decode each chirp's speed and inclination, printing its start time. | Medium4 | ImplementationString matching+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ColorvilleSimulate players advancing on a colored board by drawing cards, and report who wins or that the deck ran out. | Medium4 | SimulationImplementation+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 |
| 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 |
| MapsFor each scenario, count how many positions in the map contain an exact, non-rotated copy of the rig pattern, with both X and dot cells matching. The image is trimmed, so every position in its bounding box matters. | Medium4 | Brute forceImplementation+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 |
| Prefix CodesDecode several binary messages with a prefix code given as a heap-indexed tree string, where a bit 0 or 1 walks to a child until a leaf symbol is reached. | Medium4 | TreeImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Word PuzzleGiven a letter grid and a list of words, find each word's starting cell and one of eight reading directions, choosing the earliest match by row, column, then direction. | Medium4 | ArrayBrute force+2 | 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 |
| 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 |
| WalkParse walking segments given as duration and pace per kilometre, then report total distance in metres and average speed in km/h. | Medium4 | ImplementationMath+2 | No attempts yet | 1s | 1024 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 |
| 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 |
| 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 |
| C.S.I.: P15Count ground-connected 8-connected flower components and isolated /\/\ bird patterns in each ASCII picture. | Medium4 | DFSString matching | No attempts yet | 1s | 256 MB | Judgeable |
| Dinner Menu RouletteCount rotations that turn the current wheel letters into the target menu string and print the share as a reduced fraction. | Medium4 | String matchingMath | No attempts yet | 5s | 256 MB | Judgeable |
| Smallest number missing from a digit sequenceGiven up to 1000 digits, find the smallest non-negative integer that never occurs as a consecutive block without a leading zero. | Medium4 | String matchingBrute force | No attempts yet | 1s | 256 MB | Judgeable |
| Cyclic RotationsCount the left rotations of binary string B that exactly equal binary string A. | Medium4 | String matching | No attempts yet | 2s | 512 MB | Judgeable |
| Music Collection (Small1)For each song, find the shortest substring that appears in that song and in no other song, breaking ties by a custom lexicographic order. | Medium4 | String matchingBrute force | No attempts yet | 5s | 512 MB | Judgeable |
| Alien Language (Large)Given a word list and patterns with letter-group tokens, count for each pattern how many words match it. | Medium4 | String matchingBrute force | No attempts yet | 5s | 512 MB | Judgeable |
| Infinite stringGiven two strings of length at most 50, decide whether each repeated infinitely produces the same infinite string. | Medium4 | StringString matching | No attempts yet | 2s | 512 MB | Judgeable |
| ABBGiven a string of colors, find how many characters must be appended at the end so the resulting string becomes a palindrome. | Medium4 | StringString matching+2 | No attempts yet | 2s | 512 MB | Judgeable |
| AdvertisementGiven the L characters currently visible on a scrolling sign showing an infinitely repeated text, find the minimum possible length of the original advertisement text. | Medium5 | String matchingString | No attempts yet | 2s | 128 MB | Judgeable |
| Text FormalizationExpand every contraction and the first occurrence of each acronym in a text, following case rules and leftmost-earliest matching priority. | Medium5 | StringString matching+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Submarine IdentificationDecide whether a binary string can be split into pieces of '01' or '1' followed by at least two 0s and at least one 1, using pattern matching or DP. | Medium5 | Dynamic programmingString matching+1 | No attempts yet | 1s | 128 MB | Judgeable |
| BuzzwordsFor each line, strip spaces and report the highest occurrence count among substrings of length 1, 2, 3, and so on, stopping at the first length where no substring repeats. | Medium5 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Scrolling SignGiven k-wide words, find the minimum total letters scrolled in so that each word appears in order, allowing overlap between consecutive words. | Medium5 | Dynamic programmingString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| String ExponentiationGiven a string, find the largest exponent n such that the string is a repetition of some base string a raised to n. | Medium5 | StringString matching+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Blue JeansGiven up to 10 DNA strings of length 60, find the longest substring that appears in all of them, breaking ties alphabetically, or report none of length 3 or more. | Medium5 | StringBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| IOIOICount the occurrences of the alternating string P_N (N+1 I's and N O's) as a substring of S, counting overlaps. | Medium5 | StringSliding window+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Erdös NumbersPapers list authors under titles, and each query asks the shortest co-authorship distance from Erdos; unreachable authors get infinity. | Medium5 | GraphBFS+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Solving Linear EquationsParse each linear equation written in a recursive grammar with parentheses and multiplication, then report no, infinite, or the unique solution rounded to six decimals. | Medium5 | MathRecursion+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Alternative Scale of NotationGiven a base B and a non-negative decimal integer x, find the unique string of digits from 1 to B whose value under the shifted base-B map equals x. | Medium5 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Binary WitchGiven a binary string, predict the next L digits by matching suffixes of length 13 down to 1 against earlier occurrences, using the rightmost match. | Medium5 | StringString matching+2 | No attempts yet | 1s | 128 MB | Judgeable |
| RepetitionsGiven up to five lowercase words of length at most 2000, find the length of the longest substring that appears as a contiguous fragment in every word. | Medium5 | StringBinary search+2 | No attempts yet | 3s | 128 MB | Judgeable |
| KonkotenacjaCount the ways to split the word into nonempty pieces joined by the literal separator kot, modulo 1000000007. | Medium5 | Dynamic programmingPrefix sum+1 | No attempts yet | 2s | 128 MB | Judgeable |
| BeehivesThe program decides whether two move records describe the same hexagonal layout under rotation and reversed reading, with mirror images treated as different. | Medium5 | GeometryString matching+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Cracking the CodeGiven a plaintext and ciphertext candidates under a substitution cipher, keep every consistent match and decrypt X, printing '?' for ambiguous letters. | Medium5 | String matchingBrute force+1 | No attempts yet | 2s | 128 MB | Judgeable |
| ChorusFor each lyric, find its longest repeated substring and list which songs contain each query as a substring of it. | Medium5 | String matchingBinary search+1 | No attempts yet | 1s | 128 MB | Judgeable |
| String ExplosionRepeatedly delete every occurrence of the explosion string until none remains, printing FRULA when nothing is left. | Medium5 | StackString matching | No attempts yet | 2s | 128 MB | Judgeable |
| Clock PhotosDecide whether two sets of hand angles on a dial coincide after rotating one photo. | Medium5 | SortingString matching | No attempts yet | 1s | 256 MB | Judgeable |
| Word SearchFind each listed word in the letter grid in any of eight directions and output leftover letters, or report missing or ambiguous placements. | Medium5 | String matchingMatrix+1 | No attempts yet | 1s | 256 MB | Judgeable |
| CensoringRepeatedly delete the first occurrence of T from S, including matches formed by earlier deletions, and print what remains. | Medium5 | String matchingStack | No attempts yet | 1s | 256 MB | Judgeable |
| CensoringRepeatedly delete the first occurrence of pattern T from string S until none remains and print the result. | Medium5 | StackString matching | No attempts yet | 1s | 256 MB | Judgeable |
| MoocryptionFind the substitution cipher with no fixed letters that yields the most MOO strings in all eight grid directions. | Medium5 | Brute forceMatrix+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Counting Cafeteria MenusCount how many distinct dish sets appear when the current set of N out of M dishes shifts forward by one each meal. | Medium5 | String matchingArray+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Palindrome??Answer up to a million queries asking whether a subarray of the given number sequence reads the same forward and backward. | Medium5 | String matchingPrefix sum | No attempts yet | 1s | 256 MB | Judgeable |
| Car GameFind the first dictionary word that contains each three-letter plate as a subsequence, or report that none exists. | Medium5 | String matchingArray | No attempts yet | 2s | 256 MB | Judgeable |
| Find the Hidden WordGiven a list of known words and several messages, find which listed words occur as substrings in each message and report NO, the unique word, or AMBIGUOUS. | Medium5 | String matchingTrie | No attempts yet | 1s | 256 MB | Judgeable |
| Number of distinct substringsCount how many different contiguous substrings appear in a lowercase string of length up to 1000. | Medium5 | String matchingHash map+1 | No attempts yet | 1s | 512 MB | Judgeable |
| Typewriter Monkey (Small)Find the expected leftover bananas, which is the maximum achievable count of the target word minus its expected count in a random length S string. | Medium5 | ProbabilityBrute force+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Typewriter MonkeyFrom keyboard letter frequencies, subtract the expected overlapping occurrences of a target word in a random length-S string from the maximum possible count. | Medium5 | ProbabilityString matching | No attempts yet | 5s | 512 MB | Judgeable |
| Music Collection SearchFor each song name, find the shortest case-insensitive substring that appears in that name alone, breaking ties by a custom lexicographic order. | Medium5 | String matchingBrute force+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Irregular Expressions (Large)Decide if any substring of each string splits into equal start and end words of two or more syllables around a middle word. | Medium5 | Brute forceString+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Secret PasswordGiven two length-N sequences, decide whether one is a cyclic rotation of the other. | Medium5 | String matchingArray+2 | No attempts yet | 1s | 64 MB | Judgeable |
| Champernowne ConstantFor each query, print the K digits of the Champernowne constant starting at decimal position N, where integers are concatenated in order. | Medium5 | MathString matching+1 | No attempts yet | 8s | 512 MB | Judgeable |
| DNA stringGiven a DNA string S, find the shortest string over A, C, G, T that never occurs as a contiguous substring of S, breaking ties lexicographically. | Medium5 | StringString matching+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Rock Paper Scissors MachineGiven two RPS strings, choose where in the opponent's longer string to start matching your shorter string and report the most wins. | Medium5 | StringString matching+2 | No attempts yet | 1s | 512 MB | Judgeable |
| PasswordsCount ordered pairs of distinct passwords where one string is a substring of the other, treating the passwords as a multiset of short strings. | Medium5 | String matchingHash map+1 | No attempts yet | 1s | 64 MB | Judgeable |
| nnnnnGiven L equal to n times the digit length of n, recover n for L up to a 10^6-digit number. | Medium5 | MathBinary search+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Candy ChainGiven a candy string and a list of paid parts (each reversible), find the maximum total value obtainable by repeatedly removing sold parts and rejoining the remainder. | Medium5 | Dynamic programmingIntervals+2 | No attempts yet | 7s | 512 MB | Judgeable |
| I Have Few Friends (Large)Find whether keyword K appears in S as an exact substring, digits and all, and print 1 or 0. | Medium5 | String matchingString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Making a PalindromeFind the largest odd-length palindrome centered at index i, then answer each query by dropping the rest of the N cards. | Medium5 | String matchingDynamic programming+1 | No attempts yet | 1s | 512 MB | Judgeable |