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,786 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| Sequences without StammersPrint the smallest alphabet size for which a square-free (stammer-free) string of length n exists. | Easy3 | StringCombinatorics+1 | No attempts yet | 3s | 128 MB | Judgeable |
| JasioCount words that contain a palindrome substring of length at least 2, both literally and with i=j and p=b=d treated as equal. | Easy3 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Chaos and the StonkiEach entry is a name with hyphens inserted anywhere and letters possibly lowercased; count how many distinct real names (uppercase only) appear. | Easy3 | StringHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| NecklacesSplit each circular necklace string into runs of equal size and shade and report the longest and shortest run, preferring larger then lighter beads on ties. | Easy3 | SimulationString | No attempts yet | 1s | 512 MB | Judgeable |
| StatisticsCount how many times each requested item appears in the article: spaces, digit runs, letter runs, period-ended sentences with a word, and palindromic words. | Easy3 | StringImplementation | No attempts yet | 1s | 512 MB | Judgeable |
| LotteryChange as few letters of the given A, B, or C string as possible so no two neighbors match. | Easy3 | GreedyString | No attempts yet | 1s | 128 MB | Judgeable |
| PalindromeFrom the given words, pick two at different positions so their concatenation is a palindrome and report the lexicographically smallest one. | Easy3 | Brute forceString+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Stuttering StringsFor each input case, the program prints every length-n string over * and ! whose runs stay within the given limits, in lexicographic order with * first. | Easy3 | BacktrackingRecursion+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Circular SequenceFind the lexicographically smallest rotation of each given circular DNA string. | Easy3 | StringBrute force | No attempts yet | 1s | 128 MB | Judgeable |
| Iris (Password)Count case-insensitive subsequence occurrences of a word in a text with the prescribed greedy scan and print the count with up to the first three end positions. | Easy3 | GreedySimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| The Brave Sir Robin's cAsE cOrReCtOrThe program uppercases each letter after terminal punctuation seen across spaces and parentheses, decimal points excluded, and lowercases the rest. | Easy3 | StringSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Constant IrritationTranslate each assembler storage line from suffixed numeric constants into the matching C-style directive and literals. | Easy3 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| Fun with fractionsAdd up to 999 mixed numbers, integers, or fractions per test case and print each sum in lowest terms as a mixed number. | Easy3 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| The Queen's EnglishSpell each integer below one billion in formal British English words with hyphens and ands. | Easy3 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| Jumble MatchCount how many given words contain a substring that is a rearrangement of the pattern, where underscores match any letter. | Easy3 | Sliding windowString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Virus ReplicationGiven the DNA strands before and after one contiguous replacement, find the shortest inserted piece that explains the change. | Easy3 | StringTwo pointers | No attempts yet | 1s | 128 MB | Judgeable |
| E-Mail SnoopingCount how many listed keywords appear as whole words in the email and raise an alarm when the count reaches the threshold. | Easy3 | StringHash map | No attempts yet | 1s | 128 MB | Judgeable |
| False Sense of SecurityDecode each line by turning it into pause-free Morse code, reversing the per-character length digits, and re-splitting the code into text. | Easy3 | StringSimulation+1 | No attempts yet | 2s | 128 MB | Judgeable |
| The real messageDecide whether a received uppercase message could result from duplicating every third occurrence of each letter. | Easy3 | SimulationString | No attempts yet | 1s | 256 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 |
| String LDCount how many times the first character can be stripped from every word before a word empties or two words match. | Easy3 | StringSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| A Password Policy RequirementFind the shortest contiguous substring of at least six characters that contains an uppercase letter, a lowercase letter, and a digit. | Easy3 | Sliding windowString | No attempts yet | 1s | 128 MB | Judgeable |
| ZombdarReassemble fragmented sensor lines into semicolon-terminated entries and report each entry with the second its closing semicolon arrived. | Easy3 | SimulationString | No attempts yet | 2s | 128 MB | Judgeable |
| Sort MeThe program sorts each dataset of up to 20 words by the given custom alphabet and prints the ordered list. | Easy3 | SortingString | No attempts yet | 1s | 128 MB | Judgeable |
| Ballot Analyzing DeviceCount ballots with exactly one mark as votes, rank candidates by votes keeping ballot order on ties, and print each percentage plus the invalid share. | Easy3 | ImplementationSorting+1 | No attempts yet | 2s | 256 MB | Judgeable |
| LanguagesEach sample line is assigned to the language whose keywords it contains, matched case-insensitively after splitting on spaces and punctuation. | Easy3 | Hash mapString | No attempts yet | 3s | 128 MB | Judgeable |
| What does the fox say?Remove every known animal sound from the recording and print the remaining words in order as the fox sounds. | Easy3 | Hash mapString | No attempts yet | 1s | 128 MB | Judgeable |
| Lucky NumbersCount distinct sums of one element from each of three arrays whose decimal digits are only 5 and 8. | Easy3 | Brute forceHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Maximum Word FrequencyCount n lowercase words and print the most frequent word and its count, breaking ties by last lexicographical order. | Easy3 | Hash mapString | No attempts yet | 1s | 128 MB | Judgeable |
| Self-descriptive sentenceFill the blank in the sentence with the smallest number below 1000 whose glued English spelling makes the total letter count equal that number. | Easy3 | Brute forceString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Filter and PerformClassify each token as integer, real, or string and apply the matching digit-sum, deletion, or exponential-format operation per case. | Easy3 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Another Word SortingSort up to 1000 lowercase words by letter-value totals plus a bonus for each adjacent equal pair, breaking ties alphabetically. | Easy3 | SortingString | No attempts yet | 1s | 128 MB | Judgeable |
| Playing Fair with CryptographyGiven a key and a plaintext, build the 5x5 Playfair grid and encrypt the text into digraphs with cycling filler letters. | Easy3 | SimulationImplementation+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Reversing WordsReverse the letters of each word on every input line while keeping punctuation, spaces, and the capital pattern in place. | Easy3 | StringSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Word CrossesFor each set of four words, print both leading word crosses side by side on one shared row. | Easy3 | StringSimulation | No attempts yet | 1s | 128 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 |
| Three FriendsGiven U, find the string S such that deleting one character from U yields S repeated twice, or report NOT POSSIBLE or NOT UNIQUE. | Easy3 | StringBrute force | No attempts yet | 1s | 256 MB | Judgeable |
| Opposite WordsDecide for each word whether every letter appears as often as its opposite letter from the other end of the alphabet, ignoring case and non-letters. | Easy3 | Hash mapString | No attempts yet | 1s | 256 MB | Judgeable |
| Pantun GraderScore the first four verses of each pantun on syllable count, rhyme pairs and matching lengths, then subtract penalties for extra verses. | Easy3 | StringImplementation+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Prof. Ossama's budgetEach test case asks for the remainder when a fund N with up to one million digits is divided by X. | Easy3 | MathString | No attempts yet | 1s | 256 MB | Judgeable |
| COWCount the subsequences equal to COW in a string of C, O, and W up to length 100000. | Easy3 | Dynamic programmingString | No attempts yet | 1s | 256 MB | Judgeable |
| Big Integer AdditionAdd two decimal integers with up to 100000 digits given on one line and print their exact sum. | Easy3 | StringSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| BASE64 EncodingEncode the given alphanumeric string into BASE64 by regrouping its bytes into 6-bit values with '=' padding. | Easy3 | Bit manipulationString+1 | No attempts yet | 1s | 256 MB | Judgeable |
| BASE64 DecodingDecode a Base64 string using the standard alphabet and padding back into the original alphanumeric text. | Easy3 | ImplementationString+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Base32 EncodingConvert the input string to bytes and print its Base32 encoding with the standard alphabet and padding. | Easy3 | Bit manipulationImplementation+1 | No attempts yet | 1s | 256 MB | Judgeable |
| BASE32 DecodingPrint the original string S from its given Base32 encoding with padding. | Easy3 | Bit manipulationString+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Almost an AnagramGiven two lowercase words, order them by length then alphabetically and report whether they are identical, anagrams, almost anagrams, or unrelated. | Easy3 | Hash mapString | No attempts yet | 2s | 256 MB | Judgeable |
| The Diligent CryptographerThe program prints old for each input string that fits only a repeated permutation key, new for one that fits only a random key, and unknown otherwise. | Easy3 | StringBrute force | No attempts yet | 1s | 256 MB | Judgeable |
| LOLFind the fewest insertions, replacements, and deletions that make each given word contain lol as a contiguous substring. | Easy3 | Dynamic programmingString | No attempts yet | 1s | 256 MB | Judgeable |
| PeragramsGiven a lowercase string, find the fewest letters to delete so the remaining letters can be rearranged into a palindrome. | Easy3 | Hash mapString | No attempts yet | 1s | 256 MB | Judgeable |
| PinkThe program counts how many registered 44-letter chromosomes contain each ten-letter query as a contiguous block. | Easy3 | Hash mapString | No attempts yet | 1s | 256 MB | Judgeable |
| Ethel's EncryptionRecover the plaintext by computing the Caesar shift a^b modulo 26 and moving each ciphertext letter back by that amount. | Easy3 | Number theoryString+1 | No attempts yet | 1s | 256 MB | Judgeable |
| StrfryFor each pair of lowercase strings, decide whether the second is a rearrangement of the first. | Easy3 | Hash mapString | No attempts yet | 2s | 256 MB | Judgeable |
| NimioneseEach word is rewritten by mapping its first letter to the nearest hard consonant, copying it over later hard consonants, and adding a vowel if it ends in one. | Easy3 | StringSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Card SetSplit S into 3-character card names, print GRESKA if any card repeats, otherwise print the missing count out of 13 for suits P, K, H and T. | Easy3 | Hash mapString | No attempts yet | 1s | 32 MB | Judgeable |
| Morse CodeGiven a Morse table and a dictionary, match each gapless Morse code word to its dictionary word or report the first missing one. | Easy3 | Hash mapString | No attempts yet | 1s | 256 MB | Judgeable |
| ClassySort people by refined class rank, treating missing levels as middle, breaking ties by name. | Easy3 | SortingString+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Xedni DrawkcabReverse each uppercase word and print the reversed words in alphabetical order. | Easy3 | StringSorting | No attempts yet | 1s | 256 MB | Judgeable |
| Suffix ArrayGiven a lowercase string, print all of its suffixes in lexicographic order, one per line. | Easy3 | SortingString | No attempts yet | 1s | 256 MB | Judgeable |
| Mastering MastermindGiven a secret code and a guess of colored pegs, count exact position matches and remaining color-only matches. | Easy3 | ArrayString | No attempts yet | 1s | 256 MB | Judgeable |
| Younghoon the PranksterGiven a digit string where 1 and 6 are interchangeable and 2 and 7 are interchangeable, print its k-th candidate in lexicographic order or -1. | Easy3 | CombinatoricsString | No attempts yet | 1s | 128 MB | Judgeable |
| Lazy Spelling Bee (Small)Count distinct words formed by replacing each letter with itself or an adjacent letter of the target word. | Easy3 | CombinatoricsString | No attempts yet | 5s | 512 MB | Judgeable |
| Read Phone Number (Large)Print the digit groups from the hyphen format aloud, replacing each run of equal digits with a count word such as double or triple. | Easy3 | ImplementationString | No attempts yet | 5s | 512 MB | Judgeable |
| Consonants (Small)Count the substrings of each name that contain at least n consecutive consonants. | Easy3 | StringTwo pointers | No attempts yet | 5s | 512 MB | Judgeable |
| Speaking in Tongues (Small)Translate each Googlerese line back to English with the fixed substitution mapping derived from the given hints and example. | Easy3 | Hash mapString | No attempts yet | 5s | 512 MB | Judgeable |
| Equation restoration (Small)Fill each ? in an addition or subtraction equation with a digit so the equation holds and the whole string is lexicographically smallest. | Easy3 | Brute forceString+1 | No attempts yet | 5s | 512 MB | Judgeable |
| File Fix-it (Small)Count the mkdir commands needed to create each requested path from its missing prefixes. | Easy3 | TrieString | No attempts yet | 5s | 512 MB | Judgeable |
| File Fix-it (Large)Count the directories along each wanted path that do not exist yet and report how many mkdir calls they need. | Easy3 | TrieString | No attempts yet | 5s | 512 MB | Judgeable |
| T9 SpellingGiven messages, output the keypad press sequences that type them, inserting a space between consecutive presses on the same key. | Easy3 | StringImplementation+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Alien Language (Small)For each pattern of tokens (plain letters or letter groups), count how many of the D dictionary words it can match. | Easy3 | StringBrute force+1 | No attempts yet | 5s | 512 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 |
| Lunch is not the problem right nowConvert between an IPv8 address (eight octets) and the 64-bit unsigned integer formed by concatenating their bytes. | Easy3 | Bit manipulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Star Pattern 23Infer the star-printing rule from the sample output and reproduce the pattern for a given N between 2 and 100. | Easy3 | ImplementationSimulation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Secret CodeGiven a secret code with all distinct characters, score each same-length guess by counting exact position matches and characters present in the code but at a wrong position. | Easy3 | Hash mapString+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Passport CheckingCount how many passport numbers on a check list appear in a list of stolen numbers, counting duplicates each time. | Easy3 | Hash mapString | No attempts yet | 1s | 64 MB | Judgeable |
| Badminton Match ScoreGiven a rally-by-rally scoring string, replay a best-of-three badminton match and print each completed game's score plus the match winner. | Easy3 | SimulationString+1 | No attempts yet | 1s | 64 MB | Judgeable |
| RuneFor each language, compute each rune's power as the number of maximal runs of consecutive vowels, then sort by power descending and by name ascending. | Easy3 | SortingString+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Rhyming SlangGiven a word and lists of rhyming endings, decide for each phrase whether its last word shares a rhyming ending with the word. | Easy3 | StringHash map+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Contract ReviewFor each test case, delete every occurrence of the broken digit D from the huge integer N, then print the remaining number with leading zeros stripped. | Easy3 | StringImplementation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| What base is this?For each digit string, print its value read as octal, decimal, and hexadecimal; if it has an 8 or 9, print 0 for the octal value. | Easy3 | ImplementationMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| FBI Universal Control NumbersParse a 9-character UCN, map confusable letters to their digit characters, verify the weighted mod-27 check digit, and print the base-10 value of the first eight digits. | Easy3 | ImplementationMath+1 | No attempts yet | 2s | 512 MB | Judgeable |
| ImenaSplit a book's text into N sentences and count, for each, how many words are names (uppercase first letter, lowercase rest). | Easy3 | StringImplementation+1 | No attempts yet | 1s | 32 MB | Judgeable |
| Dudu of EnglishApply seven ordered text transformations (lowercase, of-word replacement, vowel deletion, punctuation removal, line join, space condense, 20-char reflow) to translate English into Dudu's dialect. | Easy3 | StringImplementation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Wildcard AnagramGiven two equal-length strings, check whether the second is an anagram of the first after treating its asterisks as any letters. | Easy3 | StringHash map+2 | No attempts yet | 2s | 512 MB | Judgeable |
| ReversalApply M substring reversals to a string of up to 2.5 million characters and print the final result. | Easy3 | StringImplementation+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Ticket machine keyboardGiven destination names and a pressed prefix, mark on a 4x8 grid every letter that can immediately follow the prefix in some name. | Easy3 | StringSimulation+2 | No attempts yet | 1s | 32 MB | Judgeable |
| Password ChangeFind the minimum letter changes so the first K characters equal the last K characters. | Easy3 | StringImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| Diwali lightingsGiven a pattern S repeated infinitely and a range [I, J], count how many bulbs in that range are blue. | Easy3 | MathPrefix sum+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Diwali lightings (Large)Given a pattern string repeated forever, count how many blue bulbs appear between positions I and J in the infinite sequence. | Easy3 | MathPrefix sum+2 | No attempts yet | 5s | 512 MB | Judgeable |
| PikachuDecide whether a given lowercase string can be split into a sequence of the tokens "pi", "ka", and "chu". | Easy3 | StringGreedy+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Breaking Caesar's cipherTry all 26 Caesar shifts on the ciphertext and pick the one whose plaintext contains a dictionary word as a substring. | Easy3 | StringBrute force+1 | No attempts yet | 1s | 64 MB | Judgeable |
| Reverse NonogramGiven a solved nonogram grid of '.' and 'X', print the run-length clues for every row and then every column. | Easy3 | ImplementationSimulation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Big NumberGiven a non-negative integer with up to a million digits, print its remainder modulo 20000303. | Easy3 | StringMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| The Key to CryptographyGiven an autokey cipher's ciphertext and secret word, recover the original plaintext message. | Easy3 | StringImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| DRM MessagesSplit a string in half, rotate each half by its character sum, then merge the halves by rotating one half with the other's values. | Easy3 | StringImplementation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Odd PalindromeGiven a lowercase string, decide whether every palindromic substring has odd length, printing Odd. or Or not. | Easy3 | StringBrute force+1 | No attempts yet | 1s | 512 MB | Judgeable |
| Golf CroquetSimulate a golf croquet doubles game from a stroke record and report the score and standing once a team reaches 7 points. | Easy3 | SimulationImplementation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| League TablesGiven each team's current record and a list of match results, update the records and print the table sorted by points, goal difference, goals scored, then name. | Easy3 | ImplementationSorting+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Bank Card VerifierEach test case gives a 16-digit card number as four 4-digit groups; apply the Luhn checksum rule and print Yes if the total is a multiple of 10, otherwise No. | Easy3 | ImplementationString+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Aron's Place in LineGiven the shirt colors of people in line, where each maximal run of equal colors is one group, find the position Aron occupies at the back. | Easy3 | ImplementationString+2 | No attempts yet | 1s | 32 MB | Judgeable |