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,785 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
Alien Base ConversionConvert a number written in base x into the same value written in base y, where both bases are between 2 and 36 and the value fits in four billion.Easy3MathImplementation+1No attempts yet1s128 MBJudgeable
To and FroDecode a message written row by row in alternating left-to-right and right-to-left order back into column-major plaintext.Easy3StringSimulation+2No attempts yet1s128 MBJudgeable
Word RatiosFor each line of three equal-length lowercase words, apply the per-letter alphabet shift from the first word to the second onto the third, and output all four words.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
Major ScalesFor each sequence of notes, list the keys whose major scale contains every note, ordered C through B.Easy3ImplementationString+2No attempts yet1s128 MBJudgeable
EcologyCount how many times each tree species line appears, then print each species in lexicographic order with its share of the total, rounded to four decimals.Easy3Hash mapString+1No attempts yet1s256 MBJudgeable
Zipf's LawFor each test case, count the words in a book body and print the words that appear exactly n times, in lowercase alphabetical order.Easy3Hash mapString+2No attempts yet1s128 MBJudgeable
SoundexConvert each uppercase word into its Soundex digit code, collapsing adjacent letters that share a digit.Easy3StringImplementationNo attempts yet1s128 MBJudgeable
ElectionCount the votes each candidate receives in one riding, ignore unknown names, and report the winner's party or independent, or tie if there is no strict winner.Easy3Hash mapImplementation+2No attempts yet1s128 MBJudgeable
Request for ProposalGiven a set of requirements, score each proposal by how many requirements it meets, then pick the best one by compliance and price.Easy3Hash mapString+2No attempts yet1s128 MBJudgeable
ROT13Decode lines of text by reversing the ROT13 cipher: each vowel shifts three places back in a fixed vowel order, each consonant ten back in a consonant order.Easy3ImplementationString+2No attempts yet1s128 MBJudgeable
Tales from DeCryptRead three LCG parameters, then walk the ciphertext byte by byte, advancing the generator only on printable ASCII, and apply the inverse rotation to each such byte.Easy3SimulationMath+2No attempts yet1s128 MBJudgeable
Robot Roll CallGiven a roster of names and a multi-line data stream split on spaces and tabs, report for each roster name whether it appears as an exact token.Easy3Hash mapString+2No attempts yet1s128 MBJudgeable
Verdis QuoConvert valid Roman numerals to decimal integers using addition and subtraction rules.Easy3StringSimulation+1No attempts yet1s128 MBJudgeable
Defining MomentFor each word, strip at most one valid prefix and one valid suffix, then substitute the matching English meaning, expanding the suffix after the prefix.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
It's My DerivativeFor each polynomial, print its derivative and the step-by-step evaluation of that derivative at a given x, matching the input's terse notation.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
Is the Name of This ProblemRead sentences until END and for each decide whether it has the form quote, phrase A, quote, space, A, printing Quine(A) or not a quine.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
SteganographyDecode hidden bits from odd/even runs of spaces in a text and decode five-bit groups into characters.Easy3StringBit manipulation+1No attempts yet1s128 MBJudgeable
NetiquetteDecide whether a one-line email breaks any of four netiquette rules about adjacent case, digits, isolated characters, or punctuation.Easy3StringImplementationNo attempts yet1s128 MBJudgeable
Tanning SalonSimulate a tanning salon with a fixed number of beds, tracking arrivals and departures, and count how many customers leave without a bed.Easy3SimulationImplementation+2No attempts yet1s128 MBJudgeable
W's CipherDecrypt messages by extracting each of three character groups and rotating its subsequence right by the matching key.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
Pronounceable PasswordsFor each lowercase password, check three rules: at least one vowel, no three vowels or consonants in a row, and no double letter except ee and oo.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
Word AmalgamationFor each scrambled word, print all dictionary words that are anagrams of it in alphabetical order, or NOT A VALID WORD.Easy3Hash mapSorting+2No attempts yet1s128 MBJudgeable
Skew BinaryRead each skew binary string and print its decimal value, stopping at the terminating 0 line.Easy3MathString+1No attempts yet1s128 MBJudgeable
Polynomial ShowdownGiven nine polynomial coefficients from degree 8 down to the constant, print each polynomial with signs, exponents, and coefficients formatted to drop all unnecessary characters.Easy3ImplementationSimulation+2No attempts yet1s128 MBJudgeable
Basically SpeakingConvert a number from one base to another (bases 2 to 16) and print the result right-justified in a 7-character field, or ERROR if it exceeds 7 digits.Easy3MathImplementation+2No attempts yet1s128 MBJudgeable
TranspositionTranspose a list of note names by a given number of semitones, then print each note using the 12 canonical sharp names.Easy3StringHash map+2No attempts yet1s128 MBJudgeable
Take Your VitaminsFor each line of amount, unit, requirement, and name, print the rounded daily-value percentage; collect items under 1% into a trailing list.Easy3ImplementationMath+2No attempts yet1s128 MBJudgeable
Spelling BeRead a dictionary and several emails, then report for each email whether all its words are known and list the unknown words in order.Easy3Hash mapString+2No attempts yet1s128 MBJudgeable
Counting PagesGiven a document's page count and a comma-separated list of page ranges, count the distinct pages that are actually printed, ignoring empty ranges and pages past the end.Easy3ImplementationString+2No attempts yet1s256 MBJudgeable
DanceCheck a sequence of dance steps against five textual rules and report which rules it violates, uppercasing any misplaced dip.Easy3ImplementationString+1No attempts yet1s128 MBJudgeable
Look and SayFor each input string of digits, produce the next look-and-say element by counting runs of equal digits and writing each count followed by the digit.Easy3StringImplementationNo attempts yet1s128 MBJudgeable
Seven-Segment Display AdditionDecode two seven-segment code strings into integers, add them, then re-encode the sum using the given digit codes.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
A Balanced WorldFor each line ending in a period, decide whether its round and square brackets are properly matched and nested, printing yes or no.Easy3StackString+1No attempts yet1s128 MBJudgeable
MCXI Numeral SystemRead two MCXI-strings, add their values, and print the canonical MCXI-string for the sum.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
Car ParkSimulate a sequence of car entry and exit signals for a car park of capacity S starting with C cars, stopping early if an exit occurs while empty.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
ShirtsMerge two already sorted lists of shirts and print one merged list ordered by size, then by colour letter. Multiple scenarios end with a 0.Easy3SortingTwo pointers+2No attempts yet1s128 MBJudgeable
Letter ReplacementReplace each repeated letter in a word with a symbol assigned in the order letters first repeat, comparing case-insensitively.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
TargetGiven all solution words of a letter puzzle, recover the 9 grid letters and place the letter common to every word in the middle.Easy3ArrayHash map+1No attempts yet1s128 MBJudgeable
Coded CommunicationGiven n binary strings of length b and a received string r, find the minimum Hamming distance from r to any of the n strings.Easy3StringBrute force+2No attempts yet1s128 MBJudgeable
Grocery ShoppingFor each grocery item, find its matching store item by case-insensitive name and add the club-card saving on the units actually bought.Easy3Hash mapString+1No attempts yet1s128 MBJudgeable
Subway FaresGiven a per-stop fare table and an ordered list of station names, find the number of stops between two stations and print the corresponding fare.Easy3ArrayString+2No attempts yet1s128 MBJudgeable
Campus BuildingsGiven building names and an abbreviation, list the names whose letters contain the abbreviation as a case-insensitive subsequence, in input order.Easy3StringTwo pointers+1No attempts yet1s128 MBJudgeable
A Minor and C MajorSplit the score at bar lines, count how many measure-initial notes are A, D, E versus C, F, G, and break ties with the last note.Easy3StringImplementationNo attempts yet1s128 MBJudgeable
Base KConvert each n to base k and report whether every digit from 0 to k-1 appears, formatting the output line exactly as specified.Easy3MathImplementation+2No attempts yet1s128 MBJudgeable
Longest Decreasing SuffixFor each string, print its longest suffix whose characters strictly decrease from left to right.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
Mining MapsParse each graph block, count distinct node names, and count distinct undirected tunnels including self-loops.Easy3Hash mapGraph+2No attempts yet1s128 MBJudgeable
Parity BitSplit each line into 8-bit blocks, check whether the parity bit matches the parity of the first 7 bits, and count the mismatches.Easy3ImplementationString+2No attempts yet1s128 MBJudgeable
PLU CountFor each text string, find the largest k such that PLU repeated k times is a subsequence, ignoring case.Easy3GreedyString+1No attempts yet1s128 MBJudgeable
Duplicate SSNRead a list of Social Security numbers until the sentinel 000-00-0000, then print every number that appears more than once in ascending order.Easy3Hash mapSorting+2No attempts yet1s128 MBJudgeable
DecoderEach word contributes one letter: the first letter of the first word, then the k-th letter of each word where k is the previous word's length; spaces appear when the previous word is too long.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
Secret LetterGiven a ciphertext, undo a 90-degree clockwise rotation of a square grid to recover the original letter.Easy3ImplementationArray+2No attempts yet1s128 MBJudgeable
RingsCount how many of N rings, each a 10-letter circular string, contain a given search string when read around the circle.Easy3StringString matching+2No attempts yet1s128 MBJudgeable
Look-and-Say StringApply the look-and-say run-length encoding to a digit string n times and print the resulting string.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
Character ConversionMap each character according to a conversion table where every replacement happens exactly once, and print the resulting string.Easy3Hash mapImplementation+1No attempts yet1s128 MBJudgeable
Calculator ProgramRead alternating numbers and operators, evaluate left to right ignoring precedence, and print the value when = appears.Easy3ImplementationSimulation+2No attempts yet1s128 MBJudgeable
Rotary DialGiven an uppercase word, map each letter to its phone digit and sum the dial times, where digit d costs d+1 seconds and 0 costs 11.Easy3ImplementationString+1No attempts yet1s128 MBJudgeable
Longest WordScan text until the token E-N-D, split it into words made of letters and hyphens, and print the longest such word in lowercase, breaking ties by first occurrence.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
In BrailleTranslate a string of digits to Braille cells, or three lines of Braille cells back to digits, using the fixed digit-to-cell table.Easy3StringHash map+2No attempts yet1s128 MBJudgeable
TautogramFor each sentence, decide whether every word begins with the same letter, ignoring case, until a line containing only *.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
Find the CowCount ordered pairs of indices (x, y) with x < y where an "((" starts at x and a "))" starts at y in a parenthesis string.Easy3StringPrefix sum+2No attempts yet1s128 MBJudgeable
17 TimesGiven a binary number N of up to 1000 digits, print N times 17 in binary.Easy3StringMath+2No attempts yet1s128 MBJudgeable
Adding CommasInsert a comma every three digits from the right in a given integer and print the formatted number.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
Cow CotillionGiven strings of '<' and '>', decide for each whether every character can be paired as a properly nested '><' bow, i.e. whether the brackets are balanced.Easy3StackString+2No attempts yet1s128 MBJudgeable
Encrypted SMSEach encrypted letter was shifted forward within its phone keypad key by its 1-based position; given the ciphertext, recover the original password.Easy3StringSimulation+1No attempts yet1s128 MBJudgeable
URLsParse each URL into protocol, host, optional port, and optional path, printing <default> for missing components.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
Digital RootGiven positive integers up to 1000 digits, each line until a terminating 0, print the digital root of each number.Easy3MathNumber theory+2No attempts yet1s128 MBJudgeable
Unix ls Column FormattingSort filenames by ASCII value and lay them out in column-major order with fixed-width padding, as few rows as fit in 60 characters.Easy3SortingImplementation+2No attempts yet1s128 MBJudgeable
PalindromesFor each string, decide whether it reads the same backward and whether replacing each character by its mirror and reversing gives the same string.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
Evaluating Simple C ExpressionsEvaluate a sequence of simple C expressions with +, -, and prefix or postfix ++/--, printing the expression value and the final values of used variables.Easy3ImplementationSimulation+2No attempts yet1s128 MBJudgeable
Genetic CodePrint the first n characters of the infinite square-free sequence generated by the substitution N→NOP, O→NP, P→O.Easy3StringRecursionNo attempts yet1s128 MBJudgeable
SubsequenceFor each line of input, decide whether the first string is a subsequence of the second, printing Yes or No.Easy3Two pointersString+2No attempts yet1s128 MBJudgeable
Average is not Fast Enough!Parse each team's section times in h:mm:ss form, sum them, and print the average seconds per kilometer rounded to the nearest second, or a dash if any runner was disqualified.Easy3ImplementationString+2No attempts yet1s128 MBJudgeable
HTMLRender an HTML fragment of plain text with <br> and <hr> tags, wrapping lines at 80 characters.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
Artificial Intelligence?Given a word problem stating two of power, voltage, and current with optional metric prefixes, compute the missing quantity using P = U * I.Easy3StringMath+1No attempts yet1s128 MBJudgeable
On-Line BankingSimulate a stream of bank commands (create, deposit, withdraw, transfer) over many scenarios and print the result of each request.Easy3SimulationImplementation+2No attempts yet1s128 MBJudgeable
Read the ChessboardGiven an ASCII-art chessboard, list each side's pieces in standard notation, grouped by type in a fixed order and sorted by position rules.Easy3ImplementationString+2No attempts yet1s128 MBJudgeable
Add Backward NumbersAdd two numbers whose digits are given in reverse order, printing the sum with its digits also reversed and no leading zeroes.Easy3MathString+2No attempts yet1s128 MBJudgeable
Aromatic NumbersGiven a string alternating Arabic digits and Roman numeral letters, sum each digit times its Roman value, subtracting a pair when the next Roman value is larger.Easy3StringImplementation+1No attempts yet2s512 MBJudgeable
Huffman EncodingGiven prefix-free binary codes for up to 20 letters, decode a binary string of at most 250 digits back into the original letters.Easy3TrieString+2No attempts yet2s512 MBJudgeable
SignageGiven a sign width, lay out a fixed sentence into lines, justifying each line so spaces are spread as evenly as possible, and print dots for spaces.Easy3StringSimulation+2No attempts yet1s128 MBJudgeable
Cell-Phone MessagingGiven words, compute the typing time on a phone keypad where each press takes 1 second and switching between letters on the same key adds a 2-second pause.Easy3ImplementationString+2No attempts yet1s128 MBJudgeable
Returning HomeReverse a short list of turn directions and street names, flipping each left or right turn, to produce the route from school back home.Easy3ImplementationSimulation+2No attempts yet1s128 MBJudgeable
Fix-Free CheckFor each triple of words, decide whether no word is a prefix or suffix of another, printing Yes or No.Easy3StringBrute force+2No attempts yet1s128 MBJudgeable
PoetryFor each four-line verse, extract the last syllable of the final word on every line and print which rhyme scheme it matches.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
BFedInterpret a Brainfuck program read from stdin up to '#', supporting the seven pointer, arithmetic, loop, and output commands on a 30000-cell byte tape.Easy3SimulationStack+2No attempts yet1s128 MBJudgeable
Keeping ScoreParse a 13-card hand grouped by suit, score high cards and short suits, and print each suit with points right-aligned in a fixed table.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
Card GameSimulate a 52-card game where players alternate turning cards; award points when a high card is followed by enough non-high cards, then print each score.Easy3SimulationImplementation+2No attempts yet1s128 MBJudgeable
CensorRead n lines of space-separated words and replace every word of exactly four letters with ****, printing a blank line between consecutive output lines.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
SentencesGiven lists of subjects, verbs, and objects, print every subject-verb-object sentence in alphabetical order, with a blank line between datasets.Easy3Brute forceSorting+2No attempts yet1s128 MBJudgeable
Dynamic Dictionary CodingCompress each text set by replacing repeated words with their 1-based dictionary positions, leaving first occurrences unchanged, and preserve all spacing.Easy3StringHash map+2No attempts yet1s128 MBJudgeable
Guessing Game ICompare a 4-digit secret and a guess digit by digit, count exact-position matches as circles and remaining cross-position matches as squares, with duplicates matched once.Easy3ImplementationHash map+2No attempts yet1s128 MBJudgeable
Word Problem (TEKSTER)Parse variable values embedded in a word problem, then evaluate the student's step-by-step arithmetic and print the last step's result.Easy3ImplementationString+2No attempts yet1s1024 MBJudgeable
EncryptionGiven a string encrypted with the rule x -> x^3 mod 29 + 1, recover and print the original symbols.Easy3ImplementationMath+2No attempts yet1s1024 MBJudgeable
Scrabble ScoringScore each Scrabble play by parsing its start square and direction, applying letter and word bonus multipliers from the fixed 15x15 board.Easy3ImplementationSimulation+2No attempts yet1s128 MBJudgeable
A DP ProblemParse each linear equation without parentheses, solve for x, and report the floored solution or whether it is impossible or an identity.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
Automatic PoetryGiven a bracketed first line and a truncated second line ending in dots, rebuild the second line by splicing the bracket contents in the order s4s3s2s5.Easy3StringImplementationNo attempts yet1s128 MBJudgeable
BracketsFor each line of code until the '#' line, decide whether its round, square, and curly brackets are matched and correctly nested.Easy3StackStringNo attempts yet1s128 MBJudgeable
AnagramsGiven several word lists, print the first word in each list that has the most anagrams, along with that count.Easy3Hash mapString+1No attempts yet1s128 MBJudgeable
ScrabbleGiven up to 1000 short dictionary words and a set of letter and blank tiles, count how many words the tiles can spell.Easy3ArrayString+2No attempts yet1s128 MBJudgeable
Simple Prefix CompressionSum stored lengths after prefix compression: each string stores a control byte plus the part not shared as a prefix with the previous string.Easy3StringImplementationNo attempts yet1s128 MBJudgeable