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
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| World's Worst Bus ScheduleGiven each bus's repeating route durations and your arrival time, compute how long you wait for the next bus to reach the station. | Easy3 | SimulationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Frogger's For DinnerSimulate a frog walking down a 10 by 10 road while cars wrap around their lanes and decide if any starting column reaches the far side alive. | Easy3 | SimulationBrute force+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Reordering the CowsGiven the current and target cow orders, count the permutation cycles longer than one and report the longest cycle length. | Easy3 | ArraySimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Seat AssignmentFind the (x, y) seat of the K-th person placed in a clockwise inward spiral from the bottom-left corner of a C by R grid, or print 0 when K exceeds capacity. | Easy3 | Simulation | No attempts yet | 1s | 256 MB | Judgeable |
| Colored PaperCompute the area of each of N overlapping axis-aligned rectangles that stays visible after later rectangles cover it. | Easy3 | SimulationMatrix+1 | No attempts yet | 1s | 64 MB | Judgeable |
| Snake game simulationSimulate 20 snake moves on a 15 by 15 board with growth on pellets and print the pellet count or game over with the final board. | Easy3 | SimulationQueue | No attempts yet | 1s | 256 MB | Judgeable |
| Underwater TripSimulate each steering sequence through the tunnel and report whether it reaches the end or crashes into the ceiling, floor, or a stalagmite. | Easy3 | SimulationImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Theseus and the MinotaurWalk each path on the grid, toggle every used corridor, and answer Yes when no corridor stays unwound. | Easy3 | SimulationHash map | No attempts yet | 1s | 256 MB | Judgeable |
| The Trojan HorseMark all cells visited by patrol routes on an h by w grid, then count 4-connected unvisited regions with at least s cells. | Easy3 | DFSSimulation+1 | No attempts yet | 1s | 256 MB | Judgeable |
| MemoryPlay Memory with 50 face-down cards (25 letter pairs) by calling faceup(C); find each matching pair so Jack collects all 25 candies. | Easy3 | SimulationImplementation+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Chain Disappearance PuzzleRepeatedly remove horizontal runs of three or more equal digits from a 5-column board, drop stones above into gaps, and sum the removed digits. | Easy3 | SimulationMatrix+1 | No attempts yet | 1s | 256 MB | Judgeable |
| HenryRun the greedy unit-fraction expansion of each given fraction and print its last denominator. | Easy3 | GreedyMath+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Spiral Area DivisionGiven up to 100 points in an 80 by 80 square cut into 15 labeled pieces by alternating 3-to-1 splits, output the label containing each point. | Easy3 | GeometrySimulation+1 | No attempts yet | 1s | 64 MB | Judgeable |
| Fun HouseTrace a beam from the entry through slash mirrors on a grid and mark the first wall it reaches as the exit. | Easy3 | Simulation | No attempts yet | 1s | 256 MB | Judgeable |
| Word CloudCompute each word font size from its count, pack words in order into rows of width W, and output the summed row heights. | Easy3 | SimulationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Pantun GraderScore the first four verses of each pantun on syllable count, rhyme pairs and matching lengths, then subtract penalties for extra verses. | Easy3 | StringImplementation+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Line Up Back StepsYou simulate the lineup rule for 20 students arriving in a given order and count the total backward steps. | Easy3 | SimulationBrute force | No attempts yet | 1s | 256 MB | Judgeable |
| Happy PrimeDecide whether each given number is both prime and happy under repeated digit-square sums, and print the result with its case number. | Easy3 | SimulationHash map+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Algorist ClubThe program gives each unfamiliar pair in input order the lowest free of max-degree-plus-one slots and prints zeros when a pair fits nowhere. | Easy3 | SimulationGraph | No attempts yet | 1s | 256 MB | Judgeable |
| Rolling EncryptionEncrypt a lowercase string by leaving the first k letters unchanged and shifting each later letter by the most frequent of the k original letters before it. | Easy3 | Sliding windowArray+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Cross FlipFind the fewest cross-shaped clicks that turn an all-white 3x3 board into each given target pattern. | Easy3 | Brute forceSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Refueling StopsSimulate the farthest-reachable greedy rule over ordered stations to list minimum refuel stops or report running out of petrol. | Easy3 | GreedySimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Hyacinth frequency assignmentAssign one frequency to each edge of a tree by the stated DFS rule so each node uses at most two frequencies. | Easy3 | TreeDFS+1 | No attempts yet | 1s | 256 MB | Judgeable |
| DOM TV ChannelsPensioners switch the TV from each hated channel to the youngest hater's favorite, and you count switches until the channel stabilizes or repeats. | Easy3 | GraphSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Skyscraper SilhouetteRebuild the skyline picture from N ground-based rectangles, mark the border cells, and report the perimeter without the ground side. | Easy3 | SimulationArray+1 | No attempts yet | 1s | 32 MB | Judgeable |
| Knockout RacingCount the cars whose back-and-forth motion between two points puts them inside each queried interval at the given time. | Easy3 | SimulationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Ideal ScoreboardTrack contest solves in time order and report the interval during which every team and every problem has a solve but none has all. | Easy3 | SimulationSorting | No attempts yet | 2s | 256 MB | Judgeable |
| A Population of RabbitsCount rabbit pairs alive in month M given lifespan D and breeding ages up to R, starting from one newborn pair. | Easy3 | Dynamic programmingSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| MeteorShift the connected meteor cells straight down until they rest on the ground and print the final grid. | Easy3 | SimulationMatrix+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Big Integer AdditionAdd two decimal integers with up to 100000 digits given on one line and print their exact sum. | Easy3 | StringSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Milling machinesThe program cuts each workpiece column down to the lowest cutter height from any step and prints the heights that remain. | Easy3 | SimulationImplementation | No attempts yet | 2s | 256 MB | Judgeable |
| Simple ArithmeticEvaluate single-digit expressions with usual precedence and floor division, printing WRONG INPUT for bad forms or division by zero. | Easy3 | StackSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Short PhraseFind the earliest starting word of a contiguous block whose words split into five groups totaling 5, 7, 5, 7, and 7 letters. | Easy3 | SimulationBrute force | No attempts yet | 1s | 256 MB | Judgeable |
| Palindrome in Some BaseFor each N, decide whether its base B representation is a palindrome for some B from 2 to 64. | Easy3 | MathBrute force+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Abandon ShipProcess each damage report in order and print the recalibrate, invert, divert, or abandon ship order for its category. | Easy3 | SimulationHash map | No attempts yet | 1s | 256 MB | Judgeable |
| Battle SheepSimulate Alice and Bob's preplanned Battleship shots, granting another turn after each sinking, and list the sunk ships in order and the winner. | Easy3 | SimulationImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Choosing Pizza ToppingsSimulate the given repair loop that flips one unfulfilled topping of the first unhappy friend until every friend has more than a third of wishes met. | Easy3 | SimulationImplementation+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Hydraulic ArmDecide whether each given box sequence can reach the right belt in increasing height using one shelf as a stack. | Easy3 | StackSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Dyeing DiceSimulate the die rolling along the given path, dye each bottom face on painted squares, and output the six face colors or zeros on failure. | Easy3 | SimulationImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Waiting for ChangeSimulate book sales across two queues with limited five-dollar change and report line B at its longest moment. | Easy3 | SimulationQueue | No attempts yet | 1s | 256 MB | Judgeable |
| Folding a Paper StripeSimulate the K given half-folds of a 2^K-cell stripe and print the cell numbers from top to bottom. | Easy3 | SimulationArray | No attempts yet | 1s | 256 MB | Judgeable |
| 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. | Easy3 | StringSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| ACM Contest ScoringProcess the team's submission log in order and report the number of solved problems and the total penalty including 20 minutes per prior wrong attempt. | Easy3 | SimulationHash map | No attempts yet | 1s | 256 MB | Judgeable |
| The Game of DeathStarting from player 1, follow the pointed-to players and report the first step that reaches player N, or 0 when it never does. | Easy3 | GraphSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| FootprintsCount distinct grid cells visited when walking L steps from the origin following N, S, E, and W commands. | Easy3 | SimulationHash map | No attempts yet | 2s | 256 MB | Judgeable |
| Chicken Top NPrint the row after one bottom-up merge sort stage by merging each pair of sorted groups of length N/(2k) into one sorted group of length N/k. | Easy3 | SimulationSorting | No attempts yet | 5s | 256 MB | Judgeable |
| BlurBlur a binary image up to nine times with a wrapping 3 by 3 average and count how many distinct gray values remain. | Easy3 | SimulationMatrix+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Shuffling AlongGiven a deck size and shuffle type, count how many repeated perfect shuffles restore the original order. | Easy3 | SimulationMath | No attempts yet | 1s | 256 MB | Judgeable |
| What's on the Grille?Recover the original grid message from the encrypted letters by rotating the grille, or report that the grille is invalid. | Easy3 | SimulationMatrix | No attempts yet | 1s | 256 MB | Judgeable |
| Document signaturesSchedule N officials in fixed order on their accepted weekdays to minimize the total days from the first Monday. | Easy3 | GreedySimulation | No attempts yet | 1s | 256 MB | Judgeable |
| ColliderMove the particle at position i to position j on each exposure and report the particle type at position k for each query. | Easy3 | ArraySimulation | No attempts yet | 2s | 256 MB | Judgeable |
| Josephus PermutationRemove every Kth person from a circle of N people and print the removal order in angle brackets. | Easy3 | QueueSimulation | No attempts yet | 2s | 512 MB | Judgeable |
| Forest FruitsChoose a starting fruit, then walk forward eating each fruit that still fits within capacity C, and report the largest count. | Easy3 | SimulationBrute force | No attempts yet | 1s | 64 MB | Judgeable |
| ACM-ICPC ScoreboardReplay the judging log to count each team's solved problems and penalty time, then print all teams in rank order. | Easy3 | SimulationSorting | No attempts yet | 1s | 128 MB | Judgeable |
| Pretty printing arraysReprint the given brace array so each word and brace sits on its own line with two-space indent per nesting level. | Easy3 | StackSimulation | No attempts yet | 1s | 64 MB | Judgeable |
| Contaminated MilkFrom drink and sickness logs, keep each milk every sick person drank before falling sick and report the largest drinker count. | Easy3 | SimulationBrute force | No attempts yet | 2s | 512 MB | Judgeable |
| Angry Cows (Bronze)Starting from the best bale, count how many bales explode as the blast radius grows by one each step. | Easy3 | SimulationSorting | No attempts yet | 2s | 512 MB | Judgeable |
| Mowing the FieldSimulate the grid walk and report the smallest time gap between two visits to the same cell, or -1 when no cell repeats. | Easy3 | SimulationHash map | No attempts yet | 2s | 512 MB | Judgeable |
| Bull in a China Shop (Bronze)Pick the two pieces from K candidates that shift without rotation to cover the original grid exactly once. | Easy3 | Brute forceSimulation | No attempts yet | 2s | 512 MB | Judgeable |
| gRanks (Small)Rank every athlete by summing only their M highest weighted place points, breaking ties alphabetically with skipped ranks. | Easy3 | SortingHash map+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Googol String (Small)Build the recursive 0/1 string defined by S with a middle 0 plus a switched reversal, then answer the Kth character for each test case. | Easy3 | RecursionSimulation | No attempts yet | 5s | 512 MB | Judgeable |
| Crane Truck (Small)Run each crane program on 240 circular cells with wrapping crate counts and count the truck's forward and backward moves. | Easy3 | SimulationImplementation | No attempts yet | 10s | 512 MB | Judgeable |
| Mushroom Monster (Small)Given plate counts at 10-second intervals, compute the minimum eaten under free eating and under a constant eating rate. | Easy3 | SimulationGreedy | No attempts yet | 5s | 512 MB | Judgeable |
| One move captures (small)Count all ordered pairs of chess pieces where one can capture the other in a single legal move with blocking. | Easy3 | SimulationBrute force | No attempts yet | 5s | 512 MB | Judgeable |
| Captures in One MoveCount ordered capture pairs on an 8x8 board by applying each chess piece's capture rules with blocking for sliders. | Easy3 | SimulationImplementation | No attempts yet | 5s | 512 MB | Judgeable |
| Super 2048 (Small)The program slides all tiles of an N by N 2048 board one move in the given direction, merging equal pairs once with leading tiles first. | Easy3 | SimulationMatrix | No attempts yet | 5s | 512 MB | Judgeable |
| Super 2048 (Large)Slide every tile on an N by N 2048 board in the given direction, merging equal neighbours once per move. | Easy3 | SimulationMatrix | No attempts yet | 5s | 512 MB | Judgeable |
| Cross the maze (Small)Simulate the left-hand wall-following robot for up to 10000 steps and report whether it reaches the exit with its path. | Easy3 | Simulation | No attempts yet | 5s | 512 MB | Judgeable |
| Cross the maze (large)Simulate a left-hand wall-following robot in an N by N maze for up to 10000 steps and print the step count and path if it reaches the exit. | Easy3 | SimulationMatrix | No attempts yet | 5s | 512 MB | Judgeable |
| Hedgemony (Large)Simulate one left-to-right pass that trims each bush to the average of its neighbors when taller, then report the final height of bush N-1 with six decimals. | Easy3 | SimulationMath | No attempts yet | 5s | 512 MB | Judgeable |
| Aerobics Mat PlacementPlace disc centers row by row with the given greedy rule along the longer side of the mat and print the coordinates. | Easy3 | SimulationGreedy | No attempts yet | 5s | 512 MB | Judgeable |
| Aerobics (Large)Sort students by reach, largest first, then place them line by line on the mat following the prescribed packing rule. | Easy3 | SimulationSorting | No attempts yet | 5s | 512 MB | Judgeable |
| Commute War (Small)Walk the single chain of hourly rides from home to the office, adding each wait, ride time, and geometric checkpoint delay for the expected arrival time. | Easy3 | ProbabilitySimulation+1 | No attempts yet | 5s | 512 MB | Judgeable |
| New Calendar (Small)Given months per year, days per month and days per week, count calendar rows when each month starts after the previous month and never shares a row. | Easy3 | SimulationMath | No attempts yet | 5s | 512 MB | Judgeable |
| Snapper Chain (Small)Decide whether N chained toggle switches all turn on after K snaps, which lights the bulb. | Easy3 | Bit manipulationSimulation | No attempts yet | 5s | 512 MB | Judgeable |
| Theme Park (Small)Groups board a k-seat coaster in queue order and rejoin the back after each run, so simulate R runs and add one euro per rider. | Easy3 | SimulationQueue | No attempts yet | 5s | 512 MB | Judgeable |
| Perpetual Motion (Small)Count assignments of a direction to each oriented belt on a grid of at most 4 by 4 so no two lemmings land on the same square, modulo 1000003. | Easy3 | Brute forceSimulation | No attempts yet | 5s | 512 MB | Judgeable |
| Ratings Percentage IndexGiven the win-loss matrix of every team, compute each team's RPI from win percentages and opponents' averages and print each as a reduced fraction. | Easy3 | SimulationMath+1 | No attempts yet | 5s | 512 MB | Judgeable |
| RPI (Large)Compute every team RPI rating from the win-loss schedule using own, opponents, and opponents-of-opponents win rates. | Easy3 | SimulationMath | No attempts yet | 5s | 512 MB | Judgeable |
| Button-Pressing RobotsTwo robots walk through separate hallways in parallel and press one shared ordered list of buttons in the shortest total time. | Easy3 | SimulationGreedy | No attempts yet | 5s | 512 MB | Judgeable |
| Two Button-Pressing RobotsTwo robots starting at button 1 share one ordered press sequence and move or press each second, so compute the minimum time to finish it. | Easy3 | SimulationGreedy | No attempts yet | 5s | 512 MB | Judgeable |
| Magicka (Small)Simulate invocations in order, combining the last two list elements when a rule matches and clearing the whole list when opposed elements meet. | Easy3 | SimulationStack | No attempts yet | 5s | 512 MB | Judgeable |
| Magicka Element CombiningInvoke each base element in order, merging the last two entries when they combine and clearing the list when opposed elements meet, then report the final list. | Easy3 | SimulationStack | No attempts yet | 5s | 512 MB | Judgeable |
| Rotate the BoardRotate the board 90 degrees clockwise, let every piece fall to the lowest empty cell, then report whether Red, Blue, both, or neither has K in a row. | Easy3 | SimulationMatrix+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Board RotationRotate each board 90 degrees clockwise, let gravity settle the pieces, then report whether Red, Blue, both, or neither has K in a row. | Easy3 | SimulationMatrix+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Theme Park (Small)Groups board a k-seat coaster in queue order without skipping, riders rejoin the back, and total earnings over R runs are computed. | Easy3 | SimulationQueue | No attempts yet | 5s | 512 MB | Judgeable |
| T9 SpellingGiven messages, output the keypad press sequences that type them, inserting a space between consecutive presses on the same key. | Easy3 | StringImplementation+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Ping Pong Balls (Small)Given two fixed displacement vectors, simulate the chain reaction from one starting trap and count how many distinct traps fire. | Easy3 | SimulationBFS+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Coin mazeFor each n, m, k, print either a hardcoded special maze for the two given triples or a wall-free grid with the base at (1,1) and coins in row-major order. | Easy3 | ImplementationSimulation+2 | No attempts yet | 1s | 512 MB | Judgeable |
| The Fancy TavernTwo cards hit each other simultaneously until at least one dies; decide which card survives. | Easy3 | SimulationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Tic! Tac! Toe!Given the first player and the nine moves in order, report the player who first completes a row, column, or diagonal, or 0 for a draw. | Easy3 | SimulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Who is the final winner?Each of N players holds M cards; every round all players play their largest remaining card and whoever plays the highest value scores a point. Report the player(s) with the most points. | Easy3 | SortingSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Peter and the TextbookSimulate a textbook where tearing out page i also removes page n-i+1, and answer which page sits at position p among the pages still present. | Easy3 | SimulationImplementation+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Hongjun likes FFTGenerate permutations a and b with the given pseudocode, then compute c[i] = max over valid j of a[j]*b[i-j]. | Easy3 | ArraySimulation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Dance on the CircleSimulate N men dancing around a circle of N women through rotation moves and adjacent swaps, then report which man faces each woman at the end. | Easy3 | SimulationImplementation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Star Pattern 23Infer the star-printing rule from the sample output and reproduce the pattern for a given N between 2 and 100. | Easy3 | ImplementationSimulation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Mountains Beyond MountainsGiven column heights, a highway row, and pier rules, print the N by M picture of rock, tunnel, bridge, and pier cells exactly as specified. | Easy3 | SimulationImplementation+1 | No attempts yet | 1s | 64 MB | Judgeable |
| Router 1Print either a star-shaped router with one internal hub or a fully connected bipartite router, depending on whether N*N exceeds P_lim. | Easy3 | GraphImplementation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Router 3Build a router with g groups per layer by printing 2Ng directed edges from inputs to internal nodes and from internal nodes to outputs. | Easy3 | GraphImplementation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Easy3 | SimulationString+1 | No attempts yet | 1s | 64 MB | Judgeable |