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
TitleLevelTopicsSolvedTime limitMemory limitJudge
Sequences without StammersPrint the smallest alphabet size for which a square-free (stammer-free) string of length n exists.Easy3StringCombinatorics+1No attempts yet3s128 MBJudgeable
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.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
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.Easy3StringHash map+1No attempts yet1s128 MBJudgeable
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.Easy3SimulationStringNo attempts yet1s512 MBJudgeable
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.Easy3StringImplementationNo attempts yet1s512 MBJudgeable
LotteryChange as few letters of the given A, B, or C string as possible so no two neighbors match.Easy3GreedyStringNo attempts yet1s128 MBJudgeable
PalindromeFrom the given words, pick two at different positions so their concatenation is a palindrome and report the lexicographically smallest one.Easy3Brute forceString+1No attempts yet1s256 MBJudgeable
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.Easy3BacktrackingRecursion+1No attempts yet1s128 MBJudgeable
Circular SequenceFind the lexicographically smallest rotation of each given circular DNA string.Easy3StringBrute forceNo attempts yet1s128 MBJudgeable
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.Easy3GreedySimulation+1No attempts yet1s128 MBJudgeable
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.Easy3StringSimulationNo attempts yet1s128 MBJudgeable
Constant IrritationTranslate each assembler storage line from suffixed numeric constants into the matching C-style directive and literals.Easy3ImplementationStringNo attempts yet1s128 MBJudgeable
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.Easy3MathImplementation+1No attempts yet1s128 MBJudgeable
The Queen's EnglishSpell each integer below one billion in formal British English words with hyphens and ands.Easy3ImplementationStringNo attempts yet1s128 MBJudgeable
Jumble MatchCount how many given words contain a substring that is a rearrangement of the pattern, where underscores match any letter.Easy3Sliding windowString+1No attempts yet1s128 MBJudgeable
Virus ReplicationGiven the DNA strands before and after one contiguous replacement, find the shortest inserted piece that explains the change.Easy3StringTwo pointersNo attempts yet1s128 MBJudgeable
E-Mail SnoopingCount how many listed keywords appear as whole words in the email and raise an alarm when the count reaches the threshold.Easy3StringHash mapNo attempts yet1s128 MBJudgeable
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.Easy3StringSimulation+1No attempts yet2s128 MBJudgeable
The real messageDecide whether a received uppercase message could result from duplicating every third occurrence of each letter.Easy3SimulationStringNo attempts yet1s256 MBJudgeable
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.Easy3String matchingStringNo attempts yet2s64 MBJudgeable
String LDCount how many times the first character can be stripped from every word before a word empties or two words match.Easy3StringSimulation+1No attempts yet1s128 MBJudgeable
A Password Policy RequirementFind the shortest contiguous substring of at least six characters that contains an uppercase letter, a lowercase letter, and a digit.Easy3Sliding windowStringNo attempts yet1s128 MBJudgeable
ZombdarReassemble fragmented sensor lines into semicolon-terminated entries and report each entry with the second its closing semicolon arrived.Easy3SimulationStringNo attempts yet2s128 MBJudgeable
Sort MeThe program sorts each dataset of up to 20 words by the given custom alphabet and prints the ordered list.Easy3SortingStringNo attempts yet1s128 MBJudgeable
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.Easy3ImplementationSorting+1No attempts yet2s256 MBJudgeable
LanguagesEach sample line is assigned to the language whose keywords it contains, matched case-insensitively after splitting on spaces and punctuation.Easy3Hash mapStringNo attempts yet3s128 MBJudgeable
What does the fox say?Remove every known animal sound from the recording and print the remaining words in order as the fox sounds.Easy3Hash mapStringNo attempts yet1s128 MBJudgeable
Lucky NumbersCount distinct sums of one element from each of three arrays whose decimal digits are only 5 and 8.Easy3Brute forceHash map+1No attempts yet1s128 MBJudgeable
Maximum Word FrequencyCount n lowercase words and print the most frequent word and its count, breaking ties by last lexicographical order.Easy3Hash mapStringNo attempts yet1s128 MBJudgeable
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.Easy3Brute forceString+1No attempts yet1s128 MBJudgeable
Filter and PerformClassify each token as integer, real, or string and apply the matching digit-sum, deletion, or exponential-format operation per case.Easy3StringImplementationNo attempts yet1s128 MBJudgeable
Another Word SortingSort up to 1000 lowercase words by letter-value totals plus a bonus for each adjacent equal pair, breaking ties alphabetically.Easy3SortingStringNo attempts yet1s128 MBJudgeable
Playing Fair with CryptographyGiven a key and a plaintext, build the 5x5 Playfair grid and encrypt the text into digraphs with cycling filler letters.Easy3SimulationImplementation+2No attempts yet2s128 MBJudgeable
Reversing WordsReverse the letters of each word on every input line while keeping punctuation, spaces, and the capital pattern in place.Easy3StringSimulationNo attempts yet1s128 MBJudgeable
Word CrossesFor each set of four words, print both leading word crosses side by side on one shared row.Easy3StringSimulationNo attempts yet1s128 MBJudgeable
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.Easy3String matchingStringNo attempts yet1s128 MBJudgeable
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.Easy3StringBrute forceNo attempts yet1s256 MBJudgeable
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.Easy3Hash mapStringNo attempts yet1s256 MBJudgeable
Pantun GraderScore the first four verses of each pantun on syllable count, rhyme pairs and matching lengths, then subtract penalties for extra verses.Easy3StringImplementation+1No attempts yet1s256 MBJudgeable
Prof. Ossama's budgetEach test case asks for the remainder when a fund N with up to one million digits is divided by X.Easy3MathStringNo attempts yet1s256 MBJudgeable
COWCount the subsequences equal to COW in a string of C, O, and W up to length 100000.Easy3Dynamic programmingStringNo attempts yet1s256 MBJudgeable
Big Integer AdditionAdd two decimal integers with up to 100000 digits given on one line and print their exact sum.Easy3StringSimulationNo attempts yet1s256 MBJudgeable
BASE64 EncodingEncode the given alphanumeric string into BASE64 by regrouping its bytes into 6-bit values with '=' padding.Easy3Bit manipulationString+1No attempts yet1s256 MBJudgeable
BASE64 DecodingDecode a Base64 string using the standard alphabet and padding back into the original alphanumeric text.Easy3ImplementationString+1No attempts yet1s256 MBJudgeable
Base32 EncodingConvert the input string to bytes and print its Base32 encoding with the standard alphabet and padding.Easy3Bit manipulationImplementation+1No attempts yet1s256 MBJudgeable
BASE32 DecodingPrint the original string S from its given Base32 encoding with padding.Easy3Bit manipulationString+1No attempts yet1s256 MBJudgeable
Almost an AnagramGiven two lowercase words, order them by length then alphabetically and report whether they are identical, anagrams, almost anagrams, or unrelated.Easy3Hash mapStringNo attempts yet2s256 MBJudgeable
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.Easy3StringBrute forceNo attempts yet1s256 MBJudgeable
LOLFind the fewest insertions, replacements, and deletions that make each given word contain lol as a contiguous substring.Easy3Dynamic programmingStringNo attempts yet1s256 MBJudgeable
PeragramsGiven a lowercase string, find the fewest letters to delete so the remaining letters can be rearranged into a palindrome.Easy3Hash mapStringNo attempts yet1s256 MBJudgeable
PinkThe program counts how many registered 44-letter chromosomes contain each ten-letter query as a contiguous block.Easy3Hash mapStringNo attempts yet1s256 MBJudgeable
Ethel's EncryptionRecover the plaintext by computing the Caesar shift a^b modulo 26 and moving each ciphertext letter back by that amount.Easy3Number theoryString+1No attempts yet1s256 MBJudgeable
StrfryFor each pair of lowercase strings, decide whether the second is a rearrangement of the first.Easy3Hash mapStringNo attempts yet2s256 MBJudgeable
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.Easy3StringSimulationNo attempts yet1s256 MBJudgeable
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.Easy3Hash mapStringNo attempts yet1s32 MBJudgeable
Morse CodeGiven a Morse table and a dictionary, match each gapless Morse code word to its dictionary word or report the first missing one.Easy3Hash mapStringNo attempts yet1s256 MBJudgeable
ClassySort people by refined class rank, treating missing levels as middle, breaking ties by name.Easy3SortingString+1No attempts yet2s256 MBJudgeable
Xedni DrawkcabReverse each uppercase word and print the reversed words in alphabetical order.Easy3StringSortingNo attempts yet1s256 MBJudgeable
Suffix ArrayGiven a lowercase string, print all of its suffixes in lexicographic order, one per line.Easy3SortingStringNo attempts yet1s256 MBJudgeable
Mastering MastermindGiven a secret code and a guess of colored pegs, count exact position matches and remaining color-only matches.Easy3ArrayStringNo attempts yet1s256 MBJudgeable
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.Easy3CombinatoricsStringNo attempts yet1s128 MBJudgeable
Lazy Spelling Bee (Small)Count distinct words formed by replacing each letter with itself or an adjacent letter of the target word.Easy3CombinatoricsStringNo attempts yet5s512 MBJudgeable
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.Easy3ImplementationStringNo attempts yet5s512 MBJudgeable
Consonants (Small)Count the substrings of each name that contain at least n consecutive consonants.Easy3StringTwo pointersNo attempts yet5s512 MBJudgeable
Speaking in Tongues (Small)Translate each Googlerese line back to English with the fixed substitution mapping derived from the given hints and example.Easy3Hash mapStringNo attempts yet5s512 MBJudgeable
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.Easy3Brute forceString+1No attempts yet5s512 MBJudgeable
File Fix-it (Small)Count the mkdir commands needed to create each requested path from its missing prefixes.Easy3TrieStringNo attempts yet5s512 MBJudgeable
File Fix-it (Large)Count the directories along each wanted path that do not exist yet and report how many mkdir calls they need.Easy3TrieStringNo attempts yet5s512 MBJudgeable
T9 SpellingGiven messages, output the keypad press sequences that type them, inserting a space between consecutive presses on the same key.Easy3StringImplementation+2No attempts yet5s512 MBJudgeable
Alien Language (Small)For each pattern of tokens (plain letters or letter groups), count how many of the D dictionary words it can match.Easy3StringBrute force+1No attempts yet5s512 MBJudgeable
One PieceCount how many times a short uppercase pattern N appears as a substring of a longer string H, counting overlapping occurrences.Easy3StringString matching+2No attempts yet1s128 MBJudgeable
Lunch is not the problem right nowConvert between an IPv8 address (eight octets) and the 64-bit unsigned integer formed by concatenating their bytes.Easy3Bit manipulationImplementation+2No attempts yet1s128 MBJudgeable
Star Pattern 23Infer the star-printing rule from the sample output and reproduce the pattern for a given N between 2 and 100.Easy3ImplementationSimulation+2No attempts yet2s512 MBJudgeable
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.Easy3Hash mapString+2No attempts yet2s512 MBJudgeable
Passport CheckingCount how many passport numbers on a check list appear in a list of stolen numbers, counting duplicates each time.Easy3Hash mapStringNo attempts yet1s64 MBJudgeable
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.Easy3SimulationString+1No attempts yet1s64 MBJudgeable
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.Easy3SortingString+2No attempts yet1s512 MBJudgeable
Rhyming SlangGiven a word and lists of rhyming endings, decide for each phrase whether its last word shares a rhyming ending with the word.Easy3StringHash map+1No attempts yet2s512 MBJudgeable
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.Easy3StringImplementation+1No attempts yet2s512 MBJudgeable
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.Easy3ImplementationMath+2No attempts yet2s512 MBJudgeable
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.Easy3ImplementationMath+1No attempts yet2s512 MBJudgeable
ImenaSplit a book's text into N sentences and count, for each, how many words are names (uppercase first letter, lowercase rest).Easy3StringImplementation+1No attempts yet1s32 MBJudgeable
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.Easy3StringImplementation+1No attempts yet2s512 MBJudgeable
Wildcard AnagramGiven two equal-length strings, check whether the second is an anagram of the first after treating its asterisks as any letters.Easy3StringHash map+2No attempts yet2s512 MBJudgeable
ReversalApply M substring reversals to a string of up to 2.5 million characters and print the final result.Easy3StringImplementation+1No attempts yet1s256 MBJudgeable
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.Easy3StringSimulation+2No attempts yet1s32 MBJudgeable
Password ChangeFind the minimum letter changes so the first K characters equal the last K characters.Easy3StringImplementationNo attempts yet2s512 MBJudgeable
Diwali lightingsGiven a pattern S repeated infinitely and a range [I, J], count how many bulbs in that range are blue.Easy3MathPrefix sum+2No attempts yet5s512 MBJudgeable
Diwali lightings (Large)Given a pattern string repeated forever, count how many blue bulbs appear between positions I and J in the infinite sequence.Easy3MathPrefix sum+2No attempts yet5s512 MBJudgeable
PikachuDecide whether a given lowercase string can be split into a sequence of the tokens "pi", "ka", and "chu".Easy3StringGreedy+1No attempts yet2s512 MBJudgeable
Breaking Caesar's cipherTry all 26 Caesar shifts on the ciphertext and pick the one whose plaintext contains a dictionary word as a substring.Easy3StringBrute force+1No attempts yet1s64 MBJudgeable
Reverse NonogramGiven a solved nonogram grid of '.' and 'X', print the run-length clues for every row and then every column.Easy3ImplementationSimulation+2No attempts yet2s512 MBJudgeable
Big NumberGiven a non-negative integer with up to a million digits, print its remainder modulo 20000303.Easy3StringMath+2No attempts yet2s512 MBJudgeable
The Key to CryptographyGiven an autokey cipher's ciphertext and secret word, recover the original plaintext message.Easy3StringImplementationNo attempts yet2s512 MBJudgeable
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.Easy3StringImplementation+2No attempts yet2s512 MBJudgeable
Odd PalindromeGiven a lowercase string, decide whether every palindromic substring has odd length, printing Odd. or Or not.Easy3StringBrute force+1No attempts yet1s512 MBJudgeable
Golf CroquetSimulate a golf croquet doubles game from a stroke record and report the score and standing once a team reaches 7 points.Easy3SimulationImplementation+1No attempts yet2s512 MBJudgeable
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.Easy3ImplementationSorting+2No attempts yet2s512 MBJudgeable
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.Easy3ImplementationString+2No attempts yet2s512 MBJudgeable
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.Easy3ImplementationString+2No attempts yet1s32 MBJudgeable