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
HardwareExpand each house-number order into individual numbers, count how many times each digit 0-9 appears, and print the per-digit totals plus the grand total.Easy3SimulationImplementation+1No 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
Chances of WinningGiven results of some games among four teams, count the outcomes of the remaining games where team T ends with strictly more points than every other team.Easy3Brute forceImplementation+2No attempts yet1s128 MBJudgeable
Who Has Seen the WindGiven humidity h and a time limit M, evaluate the quartic altitude formula hour by hour and report the first hour the balloon's altitude drops to zero or below.Easy3MathSimulation+2No attempts yet2s512 MBJudgeable
Up and DownTwo walkers repeat a forward/backward step cycle; after s steps, report whose distance from the start is greater, or Tied.Easy3SimulationMath+2No attempts yet2s512 MBJudgeable
PunchySimulate a tiny two-variable language, running the given instructions in order until a stop opcode, and print each requested variable value.Easy3SimulationImplementation+1No 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
GPS Text EntryGiven a fixed 5x6 letter grid, compute the total cursor moves to type a string starting from 'A' and then reach 'enter'.Easy3ImplementationSimulation+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
MaternityGiven the two alleles each parent carries for five genes, decide for each baby whether its five visible traits could result from that pairing.Easy3ImplementationCombinatorics+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
TopYodellerCompute each yodeller's cumulative score after every round, find who ends with the highest total, and report their worst rank.Easy3ArraySimulation+1No attempts yet1s128 MBJudgeable
Snakes and LaddersSimulate a Snakes and Ladders game with a fixed 100-square board, applying three given ladders and three given snakes after each dice roll until the piece reaches 100 or the player quits.Easy3SimulationImplementationNo 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
Slot MachinesSimulate a gambler who cycles through three slot machines with fixed payout periods and stops when she runs out of quarters, and report the total number of plays.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
Babbling BrooksSimulate a sequence of splits and joins on a list of streams and print the resulting flows after each split divides flow by a percentage and each join merges neighbors.Easy3ImplementationSimulation+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
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
MillenniumGiven a birthdate in a fictional 10-month calendar with alternating 19 and 20 day months, find days until year 1000, month 1, day 1.Easy3MathImplementation+2No attempts yet1s128 MBJudgeable
RectangleRepeatedly cut the largest possible square from an n by m rectangle and count how many squares result.Easy3MathImplementation+1No attempts yet1s128 MBJudgeable
ClassGiven a grid of digits, sum each cell's average absolute difference from its up to four orthogonal neighbors, and print the total with four decimals.Easy3ImplementationMatrix+2No attempts yet1s1024 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
Harmony: Parallel FifthsGiven N pairs of simultaneous two-voice pitches, list every position i where the voices form a perfect fifth (interval 5 mod 12) at both i and i+1 and both voices move.Easy3ImplementationArray+2No attempts yet3s1024 MBJudgeable
Attendance CheckGiven a permutation forming one cycle, find the student who responds last when the calling chain starts at student k.Easy3ImplementationSimulation+2No attempts yet1s1024 MBJudgeable
ShampooGiven N days and a sorted list of holidays, count how many days residents wash their hair under the stated daily rules.Easy3ImplementationSimulationNo attempts yet1s1024 MBJudgeable
SledSimulate a sled whose speed changes by a_i on each segment and drops by 1 at junctions whenever it exceeds S; report the final speed.Easy3SimulationImplementation+1No attempts yet1s1024 MBJudgeable
CouriersSimulate two couriers who each take an incoming order if free, preferring the faster one, and total each courier's earnings.Easy3SimulationImplementation+1No attempts yet1s1024 MBJudgeable
BusTrack how many passengers are on the bus after each stop and report the largest number of them that exceeds the seat count K.Easy3ImplementationSimulation+1No attempts yet1s1024 MBJudgeable
Ancient KeyboardSimulate a keyboard where each of up to 26 keys toggles an LED at two given times, and output the letter matching the LED count at each time step until all intervals end.Easy3SimulationImplementation+2No attempts yet1s128 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
Web NavigationSimulate browser back and forward navigation using two stacks, printing the current URL after each command.Easy3StackSimulation+1No attempts yet1s128 MBJudgeable
UndercutScore a five-round card game where players reveal numbered cards each round, applying undercut and tie rules, and print both totals.Easy3ImplementationSimulation+2No attempts yet1s128 MBJudgeable
Currency ExchangeGiven a 5x5 exchange-rate table where every conversion rounds to the nearest hundredth, simulate each trip and report the final dollar amount rounded to cents.Easy3SimulationImplementation+2No attempts yet1s128 MBJudgeable
Easy TradingGiven daily prices, compute moving averages over the last m and n days and print a buy or sell signal whenever the trend between them reverses.Easy3ArrayPrefix sum+2No attempts yet2s128 MBJudgeable
Kick-TippGiven each participant's predicted scores and the actual results over several rounds, compute total points, award round dots to top scorers, and print the sorted standings.Easy3ImplementationSorting+1No attempts yet1s128 MBJudgeable
StrategiesGiven contest time and problem times, simulate three orderings (input, ascending, descending) and pick the winner by problems solved, then score, then Steve.Easy3SimulationSorting+1No attempts yet1s128 MBJudgeable
Ancient PlatesApply given PERM and SHIFT rules to lines, words, or characters of a block of text, then print the result.Easy3ImplementationSimulation+1No attempts yet1s128 MBJudgeable
On the BusTrack passengers boarding and alighting over a series of stops, never exceeding the bus capacity, and report the final count.Easy3SimulationImplementationNo attempts yet1s128 MBJudgeable
Noughts & CrossesReplay each game from its recorded moves and report the winner (X or O) or Draw, ignoring moves after the win.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
TennisRead a sequence of tennis points (A/B), split it into completed games using the 15-30-40-deuce rules, and output the final game count.Easy3SimulationImplementationNo attempts yet1s128 MBJudgeable
OutfitsGiven two wardrobes numbered from opposite ends with at most one removal each, report for each day whether both girls picked the same physical outfit.Easy3ArrayImplementation+1No attempts yet1s128 MBJudgeable
ElectionSimulate instant-runoff voting over at most 5 candidates and 20 preference groups, eliminating the lowest scorer each round.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
Pseudographical RecognizerGiven a small grid of line and dot characters, decide whether the drawn characters form exactly one connected straight segment.Easy3ImplementationSimulation+1No attempts yet1s128 MBJudgeable
In QueriesMaintain a 5-column table with seeded initial rows and process insert, remove, max, min, and range-count queries over the columns.Easy3ArrayImplementation+2No attempts yet1s128 MBJudgeable
Email from the ProfessorWrite each message row by row into a grid of width k, then read columns in the order given by a permutation key, dropping padding cells.Easy3ImplementationArray+2No attempts yet1s128 MBJudgeable
Circle DrawingPaint circles onto a grid, later circles overwriting earlier ones, then print the final color of every pixel.Easy3SimulationGeometry+1No attempts yet3s128 MBJudgeable
Rectilinear Polygon With Area Equal to Its Vertex CountGiven n, print a canonical rectilinear polygon outline with n vertices and area n, or NIE when n is odd or below 4.Easy3ImplementationGeometry+2No attempts yet5s128 MBJudgeable
SticksGiven stick lengths, repeatedly merge pairs of equal length into doubled sticks and report how many distinct sticks remain.Easy3Hash mapArray+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
GrasshopperThe grasshopper crosses width x with the fewest jumps, starting at length s and halving each later jump rounded down, with 1 always allowed.Easy3GreedySimulation+1No attempts yet1s128 MBJudgeable
CardsApply k top-to-bottom card moves in order and report the number on top of the deck.Easy3QueueSimulationNo attempts yet1s128 MBJudgeable
KonduktorCount how many times each of N compartments is visited during the first K steps of a back-and-forth walk starting at compartment 1.Easy3MathSimulationNo attempts yet2s128 MBJudgeable
Hektor's Test AnswersFor each N, print the N-th letter of Hektor's 12-letter cycle over A to D formed by two steps forward and one step back.Easy3SimulationMathNo attempts yet1s128 MBJudgeable
Ducci SequenceRepeatedly replace each entry with the absolute difference of adjacent entries and report whether the tuple reaches all zeros or loops.Easy3SimulationHash mapNo attempts yet1s128 MBJudgeable
LagnoCount the most white pieces a single black move flips on an 8 by 8 Othello board.Easy3SimulationMatrix+1No attempts yet1s128 MBJudgeable
Recovering the Input NumbersReconstruct the original array that produces the given output when replayed through the circular skip-and-zero traversal.Easy3SimulationArrayNo attempts yet1s32 MBJudgeable
Cross CountryFrom the finishing order, score only six-runner teams by their top four places and pick the lowest total, breaking ties with the fifth runner.Easy3SimulationHash mapNo 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 Candy-Sharing GameEach round passes half of each candy pile to the right and tops odd counts to even until every child holds the same number.Easy3SimulationArrayNo attempts yet1s128 MBJudgeable
6174For each four-digit number, repeat the Kaprekar digit-sort subtraction until 6174 appears and report the step count.Easy3SimulationSortingNo attempts yet1s128 MBJudgeable
ACM-UCPCPick 60 finalists by scanning ranked teams under per-school caps and rank-band limits, then fill leftovers in rank order.Easy3SimulationImplementationNo attempts yet1s128 MBJudgeable
The Dean's DirectiveProcess bank commands that create, reset, deposit to, withdraw from, transfer between, and report on up to 10000 accounts with exact formatting.Easy3SimulationHash map+1No attempts yet1s128 MBJudgeable
Number That CountApply the digit-inventory operation up to 15 times and report whether the number is self-inventorying, reaches one, loops, or stays unclassified.Easy3SimulationArrayNo 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
ICPC RankingSimulate the ICPC log to score each team by solved problems and penalty time, then print the ordered ranking with ties marked.Easy3SimulationSorting+1No 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
Back and ForthSimulate every player stepping and turning on a small grid for R rounds, then report the non-it player nearest to it.Easy3SimulationImplementationNo attempts yet3s128 MBJudgeable
The real messageDecide whether a received uppercase message could result from duplicating every third occurrence of each letter.Easy3SimulationStringNo attempts yet1s256 MBJudgeable
Paying Off the DebtSimulate monthly interest rounded to the cent with a fixed payment to count months until the debt clears or report impossible.Easy3SimulationNo attempts yet2s128 MBJudgeable
It Is ColdFrom the farthest fan inward, add matching flows and subtract opposing ones, resetting on outward flow, to find the speed reaching the team.Easy3SimulationArrayNo attempts yet1s128 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
Effective Infection TimeGiven each zone infection month and strike month, compute its Effective Infection Time under the half-weight first-year rule, rounded to four decimals.Easy3SimulationMath+1No attempts yet2s128 MBJudgeable
ZombdarReassemble fragmented sensor lines into semicolon-terminated entries and report each entry with the second its closing semicolon arrived.Easy3SimulationStringNo attempts yet2s128 MBJudgeable
Round RobinSimulate rounds of T turns around the circle, remove the player who takes the last turn, and report the survivors and their shared count when the rest tie.Easy3SimulationNo attempts yet1s128 MBJudgeable
Islands in the Data StreamCount the nested islands, contiguous blocks higher than both neighbors, in each 15-number stream that starts and ends at zero.Easy3SimulationStackNo attempts yet1s128 MBJudgeable
Pisano PeriodThe program finds the period length of Fibonacci remainders modulo M for each test case.Easy3SimulationMathNo attempts yet1s128 MBJudgeable
Picking a device for the movieGiven a movie resolution, pick the cheapest of eight listed devices that maximizes the full-screen usage ratio in either orientation.Easy3SimulationMath+1No attempts yet1s128 MBJudgeable
The Sultan's ChapatiFollow the prescribed flip procedure to sort each stack largest on the bottom and print the flip positions ending with 0.Easy3SimulationArray+1No attempts yet1s128 MBJudgeable
Charles Babbage's Difference EngineGiven the first values of a low-degree polynomial, extend its finite-difference table forward and report the value at x = 50.Easy3SimulationMath+1No attempts yet1s128 MBJudgeable
Surface AreaGiven column heights on a grid, compute the total exposed surface area of the solid, including top, sides, and floor.Easy3SimulationMatrixNo attempts yet1s128 MBJudgeable
Candy FactoryEach parent in a heap-ordered binary tree makes as many candies as the smaller child count, and the total subtracts consumed ingredients from all made candies.Easy3TreeRecursion+1No attempts yet1s128 MBJudgeable
Cracking Tree CodesGiven a tree and its leaf-stripping code with some entries erased, the program replays the encoding to recover the missing numbers.Easy3SimulationTree+1No attempts yet1s128 MBJudgeable
Cabric NumberSimulate the Kaprekar digit routine to 6174 or 0 for each input and print every subtraction step.Easy3SimulationSortingNo attempts yet1s128 MBJudgeable
Quantity of White MiceSimulate monthly mouse pairs with age-based births, death after month n, and newborn removal past 100 survivors to find the month k count.Easy3SimulationImplementationNo attempts yet1s128 MBJudgeable
Color Change of Go StonesRepeat k times the rule that replaces each circular gap with the xor of its two neighbors, then count the white stones.Easy3SimulationArrayNo attempts yet1s128 MBJudgeable
Selecting the Ten Best TeachersTally valid ballots into weighted place scores and print the top ten teachers with vote breakdowns in fixed-width columns.Easy3SimulationSorting+1No attempts yet1s128 MBJudgeable
LVMSimulate the stack machine program and print the value shown by the first DONE instruction.Easy3SimulationStackNo attempts yet2s512 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
Calling All ProgrammersCount around n callers in a circle with step m and report the position of the k-th caller removed.Easy3SimulationNo attempts yet1s128 MBJudgeable
RockyA horse walks straight across a grid and turns by fixed rules when a rock blocks it; report the exit square and the number of stepped squares.Easy3SimulationMatrixNo attempts yet1s128 MBJudgeable
Mystery Graph ColoringColor vertices 0 to V-1 with the smallest color unused by colored neighbors, then print the color count, the colors, and the loop counter.Easy3GraphGreedy+1No attempts yet1s128 MBJudgeable
Bree's pantrySort the cans by height with a case-insensitive code tiebreak, then place them alternately left and right from the middle and print the row.Easy3SortingSimulationNo attempts yet1s128 MBJudgeable
Paula's dress searchCount how many middle-shop visits Paula needs to reach the shop holding her dress.Easy3SimulationBinary searchNo attempts yet1s128 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
Byte Me!Simulate the dealer's fixed hitting rules in binary blackjack and report each hit and whether the dealer wins, busts, or loses.Easy3SimulationImplementationNo attempts yet1s128 MBJudgeable