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 results2,994 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
Laser Turret MaintenanceGiven a conflict-free n-queens configuration as a column vector, output the eight rotations and reflections in a fixed order with three-character right-justified fields.Easy3ImplementationMatrix+2No attempts yet1s128 MBJudgeable
Car RacingGiven the order in which cars arrive, decide whether a single FIFO bypass lane can reorder them to increasing order.Easy3StackSimulation+1No attempts yet1s128 MBJudgeable
Verdis QuoConvert valid Roman numerals to decimal integers using addition and subtraction rules.Easy3StringSimulation+1No attempts yet1s128 MBJudgeable
Rout 66Simulate an invader whose strength drops after each stronghold it breaks, processing strongholds nearest first, and report whether all fall.Easy3SimulationSorting+1No attempts yet1s128 MBJudgeable
Queue RearrangementGiven a queue of m items and n simultaneous move operations, apply all moves at once and print the resulting queue order.Easy3ArraySimulationNo 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
LRU CachingSimulate an LRU cache over a sequence of letter accesses and exclamation-mark print requests, outputting cache contents from least to most recently used.Easy3Linked listHash map+1No attempts yet1s128 MBJudgeable
Judges' Time CalculationGiven a 12-hour start time and a contest duration, print a lookup table giving the elapsed minutes formula for each hour block.Easy3ImplementationSimulation+1No attempts yet1s128 MBJudgeable
Teleporting Firefly ChaseSimulate a chase where the chaser repeatedly teleports a fixed distance toward each firefly flash and is caught if distance drops to 1 or less.Easy3SimulationGeometry+2No 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
Symmetric OrderGiven a list of names sorted by length, rearrange them so shorter names sit at the top and bottom and longer ones in the middle, pairing names from the start.Easy3ArrayImplementation+2No attempts yet1s128 MBJudgeable
Flow LayoutPlace rectangles left to right into rows under a max width, wrap when one does not fit, and report the final window width and total height.Easy3SimulationImplementation+1No 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
Loansome Car BuyerSimulate monthly depreciation and payments on a car loan, and report the first month when the amount owed drops below the car's value.Easy3SimulationImplementation+2No attempts yet1s128 MBJudgeable
Booklet PrintingFor each page count, print which page numbers (or Blank) go on each side of every sheet in fold-over booklet order.Easy3ArrayImplementation+1No attempts yet1s128 MBJudgeable
The SnailSimulate a snail that climbs a bit less each day and slides a fixed distance each night, and report whether it escapes or falls back first.Easy3ImplementationSimulation+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
SemigroupsGiven a small multiplication table, decide whether it defines a semigroup, report the first counterexample if not, and check commutativity.Easy3Brute forceImplementation+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
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
Post OfficeSort each item's three dimensions into length, height, and thickness, then apply the postal size rules to print one of four classes.Easy3ImplementationMath+2No attempts yet1s128 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
Primorial Number SystemRepresent each positive integer in the mixed-radix primorial system where the i-th place value is the product of the first i primes.Easy3MathNumber theory+2No attempts yet1s128 MBJudgeable
Wavelet CompressionGiven a signal transformed by recursive sum/difference wavelet steps, reconstruct the original samples for each test case.Easy3Divide and conquerSimulation+1No attempts yet1s128 MBJudgeable
Bridge BiddingFor each 13-card bridge hand, compute high card points and suit lengths, then print the first applicable opening bid rule.Easy3ImplementationSimulation+1No attempts yet1s128 MBJudgeable
Gold CoinsFor each number of days, add up the gold coins when the knight is paid N coins on each of N consecutive days.Easy3MathImplementation+2No attempts yet1s128 MBJudgeable
GymGiven an N by N matrix of card counts, compute the probability distribution over N baskets for the first 10 steps of a Markov process starting at basket 1.Easy3MathMatrix+2No attempts yet1s128 MBJudgeable
Tetromino Maximum SumGiven an N x N grid of integers, place one of the five tetrominoes (with rotations, not flips) so the four covered cells have the largest sum.Easy3Brute forceImplementation+2No attempts yet1s128 MBJudgeable
The Great SaharaOn a fixed 54-triangle hex board, decide whether player one can move one pyramid to trap an opponent's pyramid immediately.Easy3SimulationImplementation+2No attempts yet1s128 MBJudgeable
Hanafuda ShuffleCards 1 to n start from the bottom, and each cut moves a contiguous block of c cards starting at position p to the top; report the top card after all cuts.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
Carbonated DrinksGiven starting empties, empties found, and the empties needed per exchange, count how many drinks Junmin can obtain and drink in total.Easy3MathSimulation+2No attempts yet1s128 MBJudgeable
When Do We Finish?Add each event's duration to its start time and print the resulting clock time, appending the number of days past midnight when the end crosses into later days.Easy3MathImplementation+2No 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
Street NumbersCount how many times each digit 0 to 9 appears on house numbers from L to H, skipping the given gap ranges.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
Hostel NightsFor each week, apply five nights of elimination rules to 20 rooms and list the students who survive the most nights, ordered by room number.Easy3ImplementationSimulation+2No attempts yet1s128 MBJudgeable
Air Old ZeelandFor each customer, sum the prices of requested products whose shipping delay fits the wait limit, flag customers who miss any product, and count them.Easy3ImplementationArray+2No attempts yet1s128 MBJudgeable
Postman JoeSimulate Joe's walk on 20 houses, flag any out-of-range or repeated house as illegal, else list the houses with no delivery.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
Driving the RoverSimulate a rover that takes one command per second, tracking its speed, heading, and position, then report the final integer coordinates.Easy3SimulationImplementationNo attempts yet1s128 MBJudgeable
CountdownGiven a Maya Long Count date and its Julian Day Number, convert today's Gregorian date to JDN and report the days until 13.0.0.0.0.Easy3ImplementationMath+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
LobbyingSum each lawmaker's donations made within 1000 days before the vote, then weight each no vote by 1/(1+D/10000) and add up both sides.Easy3ImplementationMath+2No attempts yet1s128 MBJudgeable
Sand CastlesGiven a rectangular patch, a perimeter moat, and cylindrical towers, compute how much the flat base level rises or falls so the sand volume stays fixed.Easy3GeometryMath+2No attempts yet1s128 MBJudgeable
Global WarmingGiven a small land/sea grid, mark every land cell with three or more sea neighbours as sea simultaneously, then print the tight bounding box of the remaining land.Easy3ArraySimulation+2No 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
Dividing the Pirate HoardEach of N pirates in turn splits the pile into N equal parts, keeps one part plus the remainder, and returns the rest; report each pirate's hidden coins and the leftover pile.Easy3SimulationMath+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
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
POIEach problem's value is the count of contestants who missed it; report Philip's total score and his rank using the four tiebreak terms.Easy3ImplementationArray+2No attempts yet1s256 MBJudgeable
UniqueFor each of three rounds, a player scores the number written only if no one else wrote it, and totals are printed in input order.Easy3ArrayHash map+1No attempts yet1s128 MBJudgeable
The TravelerGiven gaps between n towns and a walk of m east/west jumps, find the total distance covered, reported mod 100000.Easy3Prefix sumArray+2No attempts yet1s128 MBJudgeable
Card Captor SanggeunSimulate a two-player card game where each player always plays the smallest legal card, and report the final scores.Easy3SimulationImplementation+2No attempts yet1s128 MBJudgeable
Card RearrangementStarting from the stack 1, 2, ..., 2n, apply a sequence of cuts and riffle shuffles and print the final order of the cards.Easy3SimulationImplementation+1No 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
Rolling a DieSimulate rolling a die through a list of moves and sum the top face value after each move.Easy3SimulationImplementation+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
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
ElectricityGiven dated meter readings sorted by date, count pairs on consecutive calendar days and report how many such days exist plus the total consumption between them.Easy3ImplementationMath+2No attempts yet1s128 MBJudgeable
Bad Random NumbersSimulate the middle-square method from N and count generated values up to and including the first repeat.Easy3SimulationHash mapNo attempts yet1s128 MBJudgeable
A Spiral WalkFill an N by N grid with the visit order of a clockwise spiral that starts at the top-left and ends near the center.Easy3SimulationMatrix+1No attempts yet1s128 MBJudgeable
The Robot PlowGiven up to 200 axis-aligned rectangles on a grid at most 240 by 240, count the number of unit squares covered by at least one rectangle.Easy3ImplementationSimulation+2No attempts yet1s128 MBJudgeable
Invasion of the MilkweedSpread milkweed from a start cell to all eight neighbors each week and report the week it covers the last non-boulder cell.Easy3BFSGraph+2No attempts yet1s128 MBJudgeable
The Rock GamePrint the reflected binary Gray code cycle for N bits as 2^N + 1 lines, each line showing X for covered holes and O for uncovered ones.Easy3Bit manipulationMath+2No attempts yet1s128 MBJudgeable
SuperlativesGiven expected rain E and actual rain A, print how many times the word mega precedes drought based on the ratio E/A, or no drought if E <= A.Easy3ImplementationMath+1No attempts yet1s128 MBJudgeable
Best GrassCount clumps of # cells in a grid, where each clump is one cell or two orthogonally adjacent cells and different clumps never touch.Easy3ArraySimulation+2No attempts yet1s128 MBJudgeable
Another Cow Number GameStarting from N, repeatedly apply the Collatz rule (3N+1 if odd, N/2 if even) and count the steps until N reaches 1.Easy3SimulationMath+1No attempts yet1s128 MBJudgeable
Serious Cow TagSimulate the elimination game where each active cow tags her nearest remaining cow, and report the last cow standing.Easy3SimulationGeometry+2No attempts yet1s128 MBJudgeable
Mileage BankEach line gives a flight's distance and cabin class; sum the ACMPerk miles earned per flight, with bonuses for B and F and a 500 mile floor for Y.Easy3MathImplementation+1No attempts yet1s128 MBJudgeable
Balloon GameGiven N slots and Q arithmetic progressions, mark the slots each pass would fill (skipping already filled ones), then count the empty slots.Easy3SimulationImplementation+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
Blowing FusesSimulate toggling devices on and off, tracking the running total power and whether it ever exceeds the fuse capacity.Easy3SimulationImplementation+2No attempts yet1s128 MBJudgeable
There's treasure everywhere!Parse a map of step counts and compass directions, compute the treasure's coordinates, and print the straight-line distance from the origin.Easy3SimulationImplementation+2No attempts yet1s128 MBJudgeable
Carbon DatingGiven sample carbon mass and hourly decays, estimate age from the half-life decay formula, then round to 100 or 1000 years depending on size.Easy3MathImplementation+2No attempts yet1s128 MBJudgeable
URLsParse each URL into protocol, host, optional port, and optional path, printing <default> for missing components.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
Definite ValuesProcess a sequence of single-letter assignments, starting with only 'a' defined, and after each program part print the defined variables in alphabetical order.Easy3SimulationHash map+1No attempts yet1s128 MBJudgeable
S-TreesGiven an S-tree's variable ordering and terminal labels, evaluate the Boolean function for each supplied variable assignment.Easy3TreeSimulation+1No attempts yet1s128 MBJudgeable
Four QuartersFor each round count from 1 to 20, compute the probability that A wins, B wins, or the game ties after that many rounds of this four-coin game.Easy3ProbabilityDynamic programming+1No attempts yet1s128 MBJudgeable
Bode PlotGiven source voltage, resistance, capacitance, and several angular frequencies, compute the resistor voltage magnitude from the RC low-pass circuit equations.Easy3MathSimulation+2No attempts yet1s128 MBJudgeable
Set MeGiven tableaus of Set cards, print each tableau and then every triple of cards that forms a valid set, in index order.Easy3Brute forceImplementation+2No attempts yet1s128 MBJudgeable
Clock PatienceSimulate Clock Patience on several decks: deal cards into 13 piles, flip cards following rank-to-pile moves, and report how many cards were exposed and the last card.Easy3SimulationArray+1No attempts yet1s128 MBJudgeable
FloppiesCompute the number of floppies by applying fixed roundings for compression, uuencoding, 30000-line splitting, and recompression.Easy3MathSimulation+1No attempts yet1s128 MBJudgeable
Transaction ProcessingRead ledger accounts and transaction entries, then print an exception report for any transaction whose debits and credits do not sum to zero.Easy3ImplementationHash map+2No attempts yet1s128 MBJudgeable
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.Easy3Hash mapSimulation+2No attempts yet1s128 MBJudgeable
Uniform GeneratorFor each pair STEP and MOD, decide whether seed(x+1) = (seed(x) + STEP) mod MOD cycles through all MOD values, which holds exactly when gcd(STEP, MOD) = 1.Easy3Number theoryMath+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
Factorial FrequenciesRead n values until a terminating 0, and for each n count how many times each digit 0 through 9 appears in the decimal representation of n! (n up to 366), printing the counts in a fixed two-line format.Easy3MathImplementation+1No 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
EdgeGiven a string of A (clockwise) and V (counter-clockwise) turns, emit PostScript line commands tracing a unit-step path from a fixed start point.Easy3SimulationImplementation+1No 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
Mosquito MultiplicationSimulate weekly mosquito stages (eggs become larvae, larvae become pupae, pupae become adults) with floor divisions and report the adult count after N Sundays.Easy3SimulationImplementation+2No 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
Bridge HandsDeal a 52-card deck to four bridge players from a given dealer, sort each 13-card hand by suit and rank, and print the hands in a fixed card-table format.Easy3ImplementationSimulation+2No attempts yet1s128 MBJudgeable
Complicated RouteParse a route of step counts in eight compass directions, sum the displacement, and print the final point and its distance from the origin to three decimals.Easy3ImplementationMath+2No attempts yet1s128 MBJudgeable