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
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| 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. | Easy3 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| To and FroDecode a message written row by row in alternating left-to-right and right-to-left order back into column-major plaintext. | Easy3 | StringSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Major ScalesFor each sequence of notes, list the keys whose major scale contains every note, ordered C through B. | Easy3 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | Hash mapString+1 | No attempts yet | 1s | 256 MB | Judgeable |
| 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. | Easy3 | Hash mapString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| SoundexConvert each uppercase word into its Soundex digit code, collapsing adjacent letters that share a digit. | Easy3 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | Hash mapImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | Hash mapString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | SimulationMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | Hash mapString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Verdis QuoConvert valid Roman numerals to decimal integers using addition and subtraction rules. | Easy3 | StringSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| SteganographyDecode hidden bits from odd/even runs of spaces in a text and decode five-bit groups into characters. | Easy3 | StringBit manipulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| NetiquetteDecide whether a one-line email breaks any of four netiquette rules about adjacent case, digits, isolated characters, or punctuation. | Easy3 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Tanning SalonSimulate a tanning salon with a fixed number of beds, tracking arrivals and departures, and count how many customers leave without a bed. | Easy3 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| W's CipherDecrypt messages by extracting each of three character groups and rotating its subsequence right by the matching key. | Easy3 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Word AmalgamationFor each scrambled word, print all dictionary words that are anagrams of it in alphabetical order, or NOT A VALID WORD. | Easy3 | Hash mapSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Skew BinaryRead each skew binary string and print its decimal value, stopping at the terminating 0 line. | Easy3 | MathString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| TranspositionTranspose a list of note names by a given number of semitones, then print each note using the 12 canonical sharp names. | Easy3 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | ImplementationMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | Hash mapString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | ImplementationString+2 | No attempts yet | 1s | 256 MB | Judgeable |
| DanceCheck a sequence of dance steps against five textual rules and report which rules it violates, uppercasing any misplaced dip. | Easy3 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Seven-Segment Display AdditionDecode two seven-segment code strings into integers, add them, then re-encode the sum using the given digit codes. | Easy3 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StackString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| MCXI Numeral SystemRead two MCXI-strings, add their values, and print the canonical MCXI-string for the sum. | Easy3 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | SimulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | SortingTwo pointers+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Letter ReplacementReplace each repeated letter in a word with a symbol assigned in the order letters first repeat, comparing case-insensitively. | Easy3 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| TargetGiven all solution words of a letter puzzle, recover the 9 grid letters and place the letter common to every word in the middle. | Easy3 | ArrayHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | Hash mapString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | ArrayString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Campus BuildingsGiven building names and an abbreviation, list the names whose letters contain the abbreviation as a case-insensitive subsequence, in input order. | Easy3 | StringTwo pointers+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Longest Decreasing SuffixFor each string, print its longest suffix whose characters strictly decrease from left to right. | Easy3 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Mining MapsParse each graph block, count distinct node names, and count distinct undirected tunnels including self-loops. | Easy3 | Hash mapGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| PLU CountFor each text string, find the largest k such that PLU repeated k times is a subsequence, ignoring case. | Easy3 | GreedyString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | Hash mapSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Secret LetterGiven a ciphertext, undo a 90-degree clockwise rotation of a square grid to recover the original letter. | Easy3 | ImplementationArray+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 |
| Look-and-Say StringApply the look-and-say run-length encoding to a digit string n times and print the resulting string. | Easy3 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Character ConversionMap each character according to a conversion table where every replacement happens exactly once, and print the resulting string. | Easy3 | Hash mapImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Calculator ProgramRead alternating numbers and operators, evaluate left to right ignoring precedence, and print the value when = appears. | Easy3 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| TautogramFor each sentence, decide whether every word begins with the same letter, ignoring case, until a line containing only *. | Easy3 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringPrefix sum+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 17 TimesGiven a binary number N of up to 1000 digits, print N times 17 in binary. | Easy3 | StringMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Adding CommasInsert a comma every three digits from the right in a given integer and print the formatted number. | Easy3 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StackString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Encrypted SMSEach encrypted letter was shifted forward within its phone keypad key by its 1-based position; given the ciphertext, recover the original password. | Easy3 | StringSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| URLsParse each URL into protocol, host, optional port, and optional path, printing <default> for missing components. | Easy3 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Digital RootGiven positive integers up to 1000 digits, each line until a terminating 0, print the digital root of each number. | Easy3 | MathNumber theory+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | SortingImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| PalindromesFor each string, decide whether it reads the same backward and whether replacing each character by its mirror and reversing gives the same string. | Easy3 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Genetic CodePrint the first n characters of the infinite square-free sequence generated by the substitution N→NOP, O→NP, P→O. | Easy3 | StringRecursion | No attempts yet | 1s | 128 MB | Judgeable |
| SubsequenceFor each line of input, decide whether the first string is a subsequence of the second, printing Yes or No. | Easy3 | Two pointersString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| HTMLRender an HTML fragment of plain text with <br> and <hr> tags, wrapping lines at 80 characters. | Easy3 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| On-Line BankingSimulate a stream of bank commands (create, deposit, withdraw, transfer) over many scenarios and print the result of each request. | Easy3 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Add Backward NumbersAdd two numbers whose digits are given in reverse order, printing the sum with its digits also reversed and no leading zeroes. | Easy3 | MathString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringImplementation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Easy3 | TrieString+2 | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Easy3 | StringSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Fix-Free CheckFor each triple of words, decide whether no word is a prefix or suffix of another, printing Yes or No. | Easy3 | StringBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| PoetryFor each four-line verse, extract the last syllable of the final word on every line and print which rhyme scheme it matches. | Easy3 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| BFedInterpret a Brainfuck program read from stdin up to '#', supporting the seven pointer, arithmetic, loop, and output commands on a 30000-cell byte tape. | Easy3 | SimulationStack+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| CensorRead n lines of space-separated words and replace every word of exactly four letters with ****, printing a blank line between consecutive output lines. | Easy3 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| SentencesGiven lists of subjects, verbs, and objects, print every subject-verb-object sentence in alphabetical order, with a blank line between datasets. | Easy3 | Brute forceSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Dynamic Dictionary CodingCompress each text set by replacing repeated words with their 1-based dictionary positions, leaving first occurrences unchanged, and preserve all spacing. | Easy3 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | ImplementationHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | ImplementationString+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| EncryptionGiven a string encrypted with the rule x -> x^3 mod 29 + 1, recover and print the original symbols. | Easy3 | ImplementationMath+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| Scrabble ScoringScore each Scrabble play by parsing its start square and direction, applying letter and word bonus multipliers from the fixed 15x15 board. | Easy3 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| A DP ProblemParse each linear equation without parentheses, solve for x, and report the floored solution or whether it is impossible or an identity. | Easy3 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| BracketsFor each line of code until the '#' line, decide whether its round, square, and curly brackets are matched and correctly nested. | Easy3 | StackString | No attempts yet | 1s | 128 MB | Judgeable |
| AnagramsGiven several word lists, print the first word in each list that has the most anagrams, along with that count. | Easy3 | Hash mapString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ScrabbleGiven up to 1000 short dictionary words and a set of letter and blank tiles, count how many words the tiles can spell. | Easy3 | ArrayString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy3 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |