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 |
|---|---|---|---|---|---|---|
| Box TopplingDecide if every standing box on an n by n floor can be toppled flat in some order and direction without leaving the floor or overlapping. | Medium7 | BacktrackingBrute force+1 | No attempts yet | 1s | 128 MB | Judgeable |
| PinballA ball falls straight down from x0 onto slanted segments, slides down each hit segment to its lower end, and the task asks for the final x coordinate. | Medium7 | GeometrySorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| TramEach boarding passenger takes the empty seat farthest from the nearest seated passenger in a 2-column tram, with ties broken by row then column. | Medium7 | HeapSorting+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Intelligent Traffic SurveillanceReplay service logs to recover zone and exemption states and print one penalty ticket per vehicle-day with every violating photo. | Medium7 | SimulationBinary search+2 | No attempts yet | 1s | 128 MB | Judgeable |
| JawbreakRemove groups of at least 3 same-coloured connected balls to maximize the sum of squared group sizes plus a 1000 point clearing bonus. | Medium7 | BacktrackingSimulation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| The Bessie ShuffleShuffle the top M cards with the given permutation, move the top card to a pile, repeat until empty, and report the card at each queried pile position. | Medium7 | SimulationMath | No attempts yet | 1s | 128 MB | Judgeable |
| The Bessie ShuffleRepeatedly shuffle the top M cards by a fixed permutation, deal the top card onto a pile, and report the labels at queried pile positions. | Medium7 | SimulationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Airplane BoardingCows walk single-file to assigned seats and each blocks the line while stowing baggage, so compute the time until every cow sits. | Medium7 | Segment treeSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| CATSGiven X, L and N, simulate the buggy two-stack counter program with global bit flips and output the number it prints. | Medium7 | SimulationStack+2 | No attempts yet | 2s | 512 MB | Judgeable |
| StrategyGiven the first two terms of the sequence where each next term is the absolute difference of the previous two, find the K-th term. | Medium7 | Number theorySimulation | No attempts yet | 1s | 16 MB | Judgeable |
| Cyclic MarathonRunners spaced around a circular track catch and eliminate the runner ahead, and the program prints the elimination order and the survivors. | Medium7 | HeapLinked list+2 | No attempts yet | 3s | 256 MB | Judgeable |
| FreightSchedule n freight trains over a single track with travel time s and one-minute departure gaps so the last train returns to Upper Bytown as early as possible. | Medium7 | GreedySimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Blind Maze EscapeFind the shortest tilt sequence of at most 10 moves that exits the marble from every empty cell, breaking ties lexicographically. | Medium7 | BFSGraph+2 | No attempts yet | 2s | 256 MB | Judgeable |
| LanguagesGuess the language of each 100-symbol excerpt, learning online from the correct answer returned after every guess, and maximize accuracy over 10000 turns. | Medium7 | SimulationImplementation+2 | No attempts yet | 10s | 256 MB | Judgeable |
| Road WorkSchedule cars from both ends through one shared lane to minimize how many drivers wait past their patience limit. | Medium7 | Dynamic programmingSimulation | No attempts yet | 1s | 512 MB | Judgeable |
| Self-Intersecting PathCheck a robot path that moves forward and always turns right for any self-touching and report the longest valid prefix. | Medium7 | GeometrySimulation | No attempts yet | 2s | 256 MB | Judgeable |
| Zombie ApocalypseMove up to g people from the start across directed roads with entry limits and travel times to get the most to a hospital by time s. | Medium7 | GraphSimulation | No attempts yet | 5s | 512 MB | Judgeable |
| BanksFlipping a negative bank in a circle to positive takes the same amount from both neighbors; the goal is the fewest flips leaving every capital nonnegative. | Medium7 | GreedySimulation+1 | No attempts yet | 5s | 256 MB | Judgeable |
| UFOSimulate K laser shots that each remove the first R cells reaching one layer along a row or column, then find the P by P square with the largest remaining sum. | Medium7 | Segment treeSimulation+2 | No attempts yet | 5s | 256 MB | Judgeable |
| Path of Least PersistenceChange at most one square's jump so the walk from the top-left corner to the bottom-right corner is as short as possible. | Medium7 | GraphShortest path+2 | No attempts yet | 3s | 256 MB | Judgeable |
| MancalaFor each marble count N, print the pits of the unique Tchoukaillon board that sweeps every marble into the Roumba. | Medium7 | MathSimulation+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Groundwater ReservesUniform rain fills a walled polygonal reservoir where each basin spills over its lower rim once full, and the task asks for the highest water surface reached. | Medium7 | SimulationGeometry+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Can't stop playingStick each arriving power-of-two block to the left or right end, merge equal neighbours, and report if one block can remain with the smallest direction string. | Medium7 | Dynamic programmingBit manipulation+2 | No attempts yet | 10s | 256 MB | Judgeable |
| BilliardPredict which stationary ball a struck billiard ball hits first as it reflects off cushions over a path of length 10000. | Medium7 | GeometrySimulation | No attempts yet | 8s | 256 MB | Judgeable |
| Coding ContestPlace coders in the free starting slots so the queue contest that pairs the strongest and weakest of each front triple leaves the strongest possible survivor. | Medium7 | Binary searchSimulation+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Revenge of the ants 1Ants march both ways around a circular rail and reverse on head-on meeting; find the first time every ant is back at its start with its initial direction. | Medium7 | MathNumber theory+1 | No attempts yet | 5s | 256 MB | Judgeable |
| CensoringRepeatedly delete the leftmost occurrence of any of N forbidden words from string S until none remains and print the result. | Medium7 | String matchingStack+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Computer LabNew students each take the middle seat of the longest empty stretch, and each query asks where a given arrival sits. | Medium7 | HeapDivide and conquer+1 | No attempts yet | 4s | 512 MB | Judgeable |
| Trapped in the HaybalesBessie breaks any bale smaller than her running start, and you must find the cheapest single bale to enlarge so she never leaves the outer bales. | Medium7 | Two pointersSorting+1 | No attempts yet | 1s | 256 MB | Judgeable |
| BowlingCount the distinct bowling games whose frame symbols and running totals match the blurred notes. | Medium7 | Dynamic programmingSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| SouvenirsBuy souvenirs from merchants in order with gold and silver coins and choose how to pay each price to maximize the number bought. | Medium7 | Dynamic programmingGreedy+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Dragon curveReport the cursor position after the Xth drawn segment of the order N dragon curve generated by the given rewriting rules. | Medium7 | RecursionDivide and conquer+2 | No attempts yet | 1s | 256 MB | Judgeable |
| 500-Yen SavingVisit shops in order, paying with held coins and bills, to collect the most 500-yen coins in change and spend the least for them. | Medium7 | Dynamic programmingSimulation+1 | No attempts yet | 8s | 256 MB | Judgeable |
| Monotone WalkwayGiven unordered cafe coordinates on an x-monotone orthogonal path from the origin, recover the visit order and report the coordinates of the queried positions. | Medium7 | SortingGeometry+1 | No attempts yet | 5s | 256 MB | Judgeable |
| Solving a 2×2×2 cubeGiven an unfolded 2x2x2 cube net, compute the fewest quarter turns that make each face a single color. | Medium7 | BFSSimulation+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Rainbow ZamboniA zamboni paints cells on a wrapping grid while walking ever-longer legs that turn clockwise, and you print the final colors and resting cell. | Medium7 | MathSimulation+1 | No attempts yet | 1s | 256 MB | Judgeable |
| SolitaireGiven the starting deck order, compute the fewest redeals needed to move every card to the goal pile using the helper as ordered storage. | Medium7 | SimulationGreedy+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Word by mouthSimulate the recursive WBM(m) vote, where faulty friends always forward cat, and report each loyal friend's majority word. | Medium7 | SimulationDynamic programming+1 | No attempts yet | 3s | 256 MB | Judgeable |
| TanksTrace a shot through a convex hull and inner boxes, applying face resistance and ricochets, and report pierced components and where it stops. | Medium7 | GeometrySimulation | No attempts yet | 1s | 256 MB | Judgeable |
| FygonGiven a short program of nested loops bounded by n, outer loop variables, or small constants, output the exact count of lag executions as a polynomial in n. | Medium7 | MathCombinatorics+2 | No attempts yet | 2s | 256 MB | Judgeable |
| Jelly RaidGuide the child from the bed to the fridge in the fewest turns while dodging patrols that catch anything sharing a clear row or column. | Medium7 | BFSSimulation+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Falling BlocksPlace a repeating sequence of pentomino pieces on a 3 by 10 board with Tetris drops and row clears to maximize the count, or report forever. | Medium7 | GraphDFS+2 | No attempts yet | 4s | 256 MB | Judgeable |
| GodzillaGuide mechs across open and ruined blocks to reach a clear row or column shot at Godzilla on his fixed path with the fewest homes destroyed. | Medium7 | BFSSimulation+1 | No attempts yet | 2s | 256 MB | Judgeable |
| PLAY in BASICGiven a Music Macro Language score, find the character length of the shortest score with identical pitches, note lengths, volumes, and rests. | Medium7 | Dynamic programmingSimulation+1 | No attempts yet | 5s | 512 MB | Judgeable |
| JAG-channel IIFind the lexicographically smallest member posting order consistent with the recorded top-to-bottom thread picks under move-to-front reordering. | Medium7 | BacktrackingSimulation+1 | No attempts yet | 3s | 256 MB | Judgeable |
| Sprinkler layoutSara tiles her fenced farm with tromino sprinklers around scarecrows using at most as many fence holes as fields. | Medium7 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| WateringTile each 5x5 field with tromino sprinklers following the snake-order procedure and label them greedily with letters a to z. | Medium7 | BacktrackingImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Iceberg OrdersSimulate an order book with iceberg orders that match by best price then priority and refresh visible tips until each incoming order fills or rests. | Medium7 | SimulationHeap+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Being Solarly SystematicSimulate planetoids moving on a wrapping 3D grid and merging on shared cubes until no more collisions occur, then report the final planets. | Medium7 | SimulationNumber theory+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Endor ChameleonsChameleons walk a stick of length L, reverse and recolor on collision, and the total distance walked in each of K colors is reported. | Medium7 | SimulationSorting | No attempts yet | 1s | 64 MB | Judgeable |
| The Table in the DreamCount table cells holding values in each query interval, where each row starts at its index and each next entry adds the reversal of the previous entry. | Medium7 | SimulationSorting+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Space PirateChange one teleporter destination, walk K jumps from star 1, and count the landing star over all N squared rewires. | Medium7 | GraphSimulation | No attempts yet | 2s | 512 MB | Judgeable |
| Walking in JOI KingdomN walkers start at given points and move east or west at speed 1, stopping when they meet anyone, and the task asks the positions of Q of them at time T. | Medium7 | StackSimulation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Lights Out in the BarnFor each polygon vertex, walk clockwise until angles and edge lengths reveal the start, then report the worst extra distance versus the shortest exit path. | Medium7 | String matchingSimulation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Joy's TerritoryCount the unit squares with all four corners visited by repeating the same N-step walk for K days from each day's endpoint. | Medium7 | GeometrySimulation+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Snake Game SimulationSimulate a snake that grows on checkerboard food on a wrapping board with timed turns and report its length after death or one billion steps. | Medium7 | SimulationQueue+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Crane Truck (Large)Simulate a crane truck program with up to two flat loops on 240 circular cells with modulo-256 counters and count its moves before it halts. | Medium7 | SimulationMath | No attempts yet | 120s | 512 MB | Judgeable |
| Dijkstra (Large)Given a short string of i, j and k repeated X times, decide whether it splits into three nonempty parts that multiply to i, j and k under quaternion rules. | Medium7 | MathSimulation | No attempts yet | 5s | 512 MB | Judgeable |
| Minesweeper MasterPlace M mines on an R by C grid so one click on the top-left cell reveals every mine-free cell, or report that no such board exists. | Medium7 | ImplementationSimulation | No attempts yet | 5s | 512 MB | Judgeable |
| Hamiltonian CircuitInsert vertices one by one into a directed cycle in a tournament by the two given rules, and print -1 when no rule applies. | Medium7 | GraphSimulation | No attempts yet | 1.5s | 512 MB | Judgeable |
| Professor Normal (Small2)Simulate marble exchanges on an M by N grid where each child splits 12 marbles among live neighbors and children with few marbles drop out. | Medium7 | SimulationGraph+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Out of gasYou roll down a hill with free brakes and must reach distance D as fast as possible without ever passing a lead car whose positions are given at sample times. | Medium7 | GreedyMath+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Out of Gas (Large)Brake a car rolling downhill under gravity to reach distance D as fast as possible without ever passing the lead car. | Medium7 | GreedyMath+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Tide Goes In, Tide Goes Out (Small)Find the earliest reach time to an exit on a height map where water falls 10 cm/s and each move takes 1 second when the exit square has at least 20 cm of water else 10 seconds. | Medium7 | Shortest pathGraph+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Cruise Control (Small)Cars on two lanes hold fixed speeds and may change lanes freely, so decide if all can drive forever or report the latest moment a slowdown is forced. | Medium7 | Brute forceSimulation | No attempts yet | 5s | 512 MB | Judgeable |
| Cruise Control (Large)Decide whether cars with fixed speeds on a two-lane road can change lanes to avoid collisions forever, and otherwise report the latest safe time as a fraction. | Medium7 | GraphSorting+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Yut Nori Board Check (Small)Decide whether the recorded throw sequence can produce the given board under the stated Yut Nori movement, capture, and shortcut rules. | Medium7 | BacktrackingSimulation+1 | No attempts yet | 5s | 512 MB | Judgeable |
| The Killer Word (Large)Choose the dictionary word that forces the most wrong letter guesses from a guesser who tries letters in a fixed order while ruling out inconsistent words. | Medium7 | TrieSimulation+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Vanishing NumbersSort the given decimals by the round in which repeated middle-third deletion removes them, listing numbers that survive every round last in increasing order. | Medium7 | MathSimulation+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Bacteria (Large)Given initially filled rectangles on a grid evolving by a north-west neighbor rule, compute the seconds until no bacterium remains. | Medium7 | Dynamic programmingSimulation+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Making Chess Boards (Large)Repeatedly cut the largest alternating-color square, breaking ties by topmost then leftmost position, and report how many boards of each size result. | Medium7 | Dynamic programmingSimulation+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Crossing the Road (Large)Find the minimum time for a pedestrian to travel across a grid of intersections where crossing depends on periodically timed traffic lights. | Medium7 | Shortest pathGraph+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Apocalypse Soon (Small)On a grid of at most 5 by 5, simulate daily simultaneous attacks where each AI nation hits its strongest surviving neighbor, and choose one attack per day to survive as long as possible. | Medium7 | SimulationGreedy+2 | No attempts yet | 5s | 512 MB | Judgeable |
| How Big Are the Pockets? (Small)Walk a closed non-self-touching orthogonal path from run-length encoded moves and sum the area of pockets: cells outside the polygon with boundary both east and west or north and south. | Medium7 | GeometrySimulation+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Mousetrap (Large Input)In the perfect Mousetrap deck of K cards, report the card value at each queried position. | Medium7 | SimulationImplementation+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Spinner (Large)Given a circular row of R, G, B cells and a three-cell local update rule, count each color after K synchronous rounds with K up to 1e9. | Medium7 | SimulationMath | No attempts yet | 1s | 256 MB | Judgeable |
| What Really Happened on Mars?Simulate a real-time task scheduler under the priority ceiling protocol and print the finish time of each task. | Medium7 | SimulationGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Block GameA ball launched at 45 degrees bounces off three walls of a grid; count how many distinct polyomino blocks its 45-degree path passes through the interior of. | Medium7 | ImplementationGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Cubic ArtGiven a cube state and a move sequence, apply point updates that replace one move and print the resulting cube state after each update. | Medium7 | Segment treeSimulation+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| New Hanoi TowerGiven three rods with up to 10 labeled disks, find the minimum number of moves to sort them so each rod holds only its matching disk type. | Medium7 | BFSImplementation+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Special Unit CHSimulate a cart moving on a line with agents that board it, are shot, die, and revive, and report the cart's position at each query time. | Medium7 | SimulationImplementation | No attempts yet | 2s | 64 MB | Judgeable |
| Fairies' SorceryGiven M-1 recorded spells and the final arrangement, find the position and type of one missing spell cast by a specified fairy. | Medium7 | SimulationImplementation | No attempts yet | 2s | 256 MB | Judgeable |
| Arcade!Given a triangular grid of holes with per-hole bounce probabilities and payouts, compute the expected payout of one dropped ball. | Medium7 | ProbabilityDynamic programming+2 | No attempts yet | 2s | 512 MB | Judgeable |
| DungeonA hero moves on a small grid while rectangular traps slide and freeze at the walls; find the earliest time to reach the exit without ever standing on a trapped cell. | Medium7 | BFSSimulation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Animal Companion in MazeGiven a directed room graph, find the longest walk where George never immediately reverses the door he just used, or report Infinite if he can walk forever. | Medium7 | GraphSimulation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Marble EscapeA board holds a red marble, a blue marble and one hole; tilting slides both marbles at once, and you must decide whether the red marble can drop into the hole within 10 tilts without the blue marble falling in. | Medium7 | BFSSimulation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Endless TurningSimulate a scooter rider who turns right at every intersection, and report her road after N turns or when she exits the city. | Medium7 | GeometrySimulation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Easy ReadingGiven a book text and a picture of painted cells, find the shortest prefix-contiguous text segment whose pen strokes draw exactly that picture up to translation. | Medium7 | String matchingHash map+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Sand Tiger SharkSimulate a daily cannibalism process where each embryo eats the largest living embryo below it, and find the latest day embryo m can survive by choosing its meals. | Medium7 | SimulationGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| A Midsummer Night's DreamSimulate sightings and potion timings to determine who each dosed person first sees, then count mutual pairs. | Medium7 | SimulationImplementation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Mysterious MazeA robot in a grid moves forward or turns according to a fixed sequence of turns; decide whether it can reach the exit once the turns run out. | Medium7 | BFSSimulation+2 | No attempts yet | 8s | 512 MB | Judgeable |
| Dungeon Quest IIGiven a fixed walking route through a grid of traps and up to 12 one-use potions, decide whether the agent can survive to the end. | Medium7 | Dynamic programmingBit manipulation+1 | No attempts yet | 8s | 512 MB | Judgeable |
| OperatorSimulate callers who retry after hanging up, and find the fewest operators so all calls finish within time T. | Medium7 | SimulationBinary search+2 | No attempts yet | 8s | 512 MB | Judgeable |
| Robots' CrashGiven moving robots with two possible opposite velocities, find the earliest time any two centers come within distance 2r, or report SAFE. | Medium7 | GeometrySimulation+1 | No attempts yet | 8s | 512 MB | Judgeable |
| Cairo CorridorEach tile is split into two pentagon halves; find the connected clear region touching all four borders and decide whether it is minimal. | Medium7 | GraphBFS+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Circle of LifeA circular binary strip updates so each cell is alive next generation only if exactly one neighbor is alive; find the state after T generations, with T up to 10^15. | Medium7 | Bit manipulationMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Through a Maze DarklyA planar maze lists each room's neighbors in clockwise order; for each starting room, find the longest wall-following (right-hand rule) closed walk before returning to the start. | Medium7 | GraphDFS+2 | No attempts yet | 2s | 512 MB | Judgeable |
| AppleSimulate gravity, rotations, and waiting on a board with one apple, then print the final board state. | Medium7 | SimulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Sorting with allowed swapsGiven a permutation and allowed swaps, decide if the given pairs can sort it and output the swaps produced by the described leaf-removal rule on the spanning forest. | Medium7 | GraphDFS+2 | No attempts yet | 0.5s | 128 MB | Judgeable |
| ZonesA diamond-shaped zone grows by extending one of four sides each step; output how many zones border each zone. | Medium7 | ImplementationGeometry+1 | No attempts yet | 1s | 128 MB | Judgeable |