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 |
|---|---|---|---|---|---|---|
| Fax RegionsGiven the width and run length encoding of a huge fax image, count the connected dark regions using 4-directional adjacency without expanding individual pixels. | Hard8 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Split WindowsGiven a preorder traversal of a split tree, draw the minimum-sized grid whose boundaries match the layout, applying proportional rounding at each split. | Hard8 | TreeRecursion+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Edge DetectionGiven an image as run-length encoded runs, set each output pixel to the largest absolute difference from its 8 neighbors, and emit the result as runs. | Hard8 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Out of SightGiven a walled grid, your start, and the step-by-step routes of several robots, find the maximum number of turns you can survive without any robot seeing you along a row or column. | Hard8 | BFSSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Crosswords InsiderGiven a list of words and a crossword grid template, decide whether each word can fill one run of empty cells and output the lexicographically smallest filled grid. | Hard8 | BacktrackingSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Zoned OutSimulate clerks who union incoming forms with all their past outputs, apply checks and erasures, and report the final version clerk 0 sends. | Hard8 | SimulationGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| GHOSTGiven a GHOST position and dictionary, decide whether the computer should challenge, add the smallest safe letter, or bluff. | Hard8 | Game theoryTrie+2 | No attempts yet | 1s | 128 MB | Judgeable |
| CosmoCraftDecide how to split income among workers, facilities, and army each turn so all attacks are survived and the final army is as large as possible. | Hard8 | GreedySimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Catching Shade in FlatlandGiven N disjoint circles inside a park, track a ray from a sun rotating around the origin and report the maximum total chord length cut through all trees over 1440 one-minute samples. | Hard8 | GeometryMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| PapaGiven consistent family relations, infer spouses, parents, children, and sexes, then answer yes, no, or unknown for kinship queries like niece or grandfather. | Hard8 | GraphUnion-find+2 | No attempts yet | 1s | 128 MB | Judgeable |
| WhenExecute a complete When program, an event-driven language with simultaneous Set assignments and a rotating active-clause scheduler, and print its output. | Hard8 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| National TreasuresGiven a grid of artifacts with bitmask critical points and cells already holding guards, replace some artifacts with hired guards so every remaining artifact has a guard on each of its critical points, minimizing hires. | Hard8 | GreedyMinimum spanning tree+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Queue SortGiven a permutation in a queue and two auxiliary stacks, find the minimum number of bulk transfer operations to sort the queue into ascending order. | Hard8 | BFSSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Driving an Icosahedral RoverGiven a triangular grid and an icosahedron that rolls face-over-edge, find the fewest rolls to reach trigon (x, y) with face n on the bottom. | Hard8 | BFSSimulation+2 | No attempts yet | 3s | 128 MB | Judgeable |
| Hexerpents of HexwampGiven a chain of up to 8 hexagon sections on a hex grid with rocks, find the minimum number of simultaneous legal moves to bring the head to a goal cell. | Hard8 | BFSSimulation+2 | No attempts yet | 10s | 128 MB | Judgeable |
| Water TankSimulate water filling a 100 cm tank divided by partition boards of distinct heights, with faucets pouring into regions, and report the exact water level at given positions and times as integers or reduced fractions. | Hard8 | SimulationSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| JezzballGiven up to ten bouncing atoms, find the earliest time a horizontal or vertical ray from a fixed point can be drawn without any atom touching it. | Hard8 | GeometrySimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Link and Pop -- the Block GameSimulate Link and Pop: repeatedly remove the best matching pair (1, 2, or 3 segment link), let blocks slide by their attributes, and print the final board. | Hard8 | SimulationImplementation+2 | No attempts yet | 2s | 128 MB | Judgeable |
| The Rotation GameGiven a 24-cell board, find the shortest sequence of the eight line-rotation moves that makes the eight center cells show the same symbol. | Hard8 | DFSBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The Pharaoh's CurseOn a small grid, S pushes up to two sarcophagi onto buttons while stepping around them, and must reach the exit with all buttons held; find the minimum steps or report impossible. | Hard8 | BFSGraph+2 | No attempts yet | 5s | 128 MB | Judgeable |
| Stealth NinjaGiven guards patrolling a grid with periodic vision, decide whether a ninja can walk from the front wall to the back wall unseen. | Hard8 | GraphBFS+1 | No attempts yet | 1s | 128 MB | Judgeable |
| FloodGiven a non-crossing grid-aligned wall network, determine which walls survive after water bursts outward-inward hour by hour until all regions flood. | Hard8 | GraphBFS+2 | No attempts yet | 1s | 128 MB | Judgeable |
| WarshipsEach warship is an axis-aligned or diagonal segment in an n by n grid; each horizontal or vertical laser shot removes all ships touching that line, and you report the heaviest weight removed per shot. | Hard8 | GraphSimulation+2 | No attempts yet | 6s | 256 MB | Judgeable |
| Polish FlagThree children grow regions of blocks from three fixed edges with priority rules and simultaneous expansion each turn; count each child's white (top) and red (bottom) cells. | Hard8 | SimulationGeometry+2 | No attempts yet | 2s | 128 MB | Judgeable |
| IciclesIcicles grow each hour when strictly longer than both neighbors and snap at length L; find the hour when all have broken. | Hard8 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Ladder GameGiven a ladder with n lines and m rungs, erase at most one rung to minimize the sum of scores reached from the leftmost k starting lines. | Hard8 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Moving Cups Across Three TraysCups of sizes 1..n sit stacked (largest on top) on three trays; with moves allowed only between A-B and B-C, find the minimum number of moves to gather every cup onto A or C, or report -1 if more than m are needed. | Hard8 | BFSDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Fence MakingFor each integer radius and spacing pair, count holes drilled through repeated remelting of the strip, then sum C(d,r,S) over all pairs. | Hard8 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| PetanqueSimulate seven petanque throws where a moving ball travels along its direction, possibly striking other balls and transferring its remaining roll, then decide who owns the closest boule to the coche and count points. | Hard8 | GeometrySimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Cutting EdgeGiven non-overlapping rectangles that tile a big pane, output the sequence of edge-to-edge cuts (smallest X1, then smallest Y1 first) that separates every rectangle. | Hard8 | GeometrySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Runner PawnsOn an 8x8 board with up to 8 pawns advancing one row per round, find the minimum knight moves to capture all pawns, or report impossible. | Hard8 | BFSGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| MoversFor each box in order, decide whether it can be slid from the open left side to its destination without overlapping placed boxes or walls, and list the rejects. | Hard8 | GeometrySimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The Crayfish ScrivenerProcess type and undo commands, including nested undos, and answer queries for the character at a given position. | Hard8 | StackTree+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Jousting TournamentGiven the starting order of N-1 knights and C fixed round intervals, find the smallest insertion position for a late knight with skill R that maximizes the number of rounds it wins. | Hard8 | ArraySimulation+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Hill WalkGiven non-crossing slanted segments, simulate Bessie climbing each hill and falling straight down at its upper end, counting the distinct hills she touches. | Hard8 | SortingBinary search+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Unlocking BlocksGiven three connected polyomino shapes on a small grid, find the minimum total number of unit slides that makes their bounding boxes pairwise non-overlapping, or -1 if impossible. | Hard8 | BFSSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Cow TreatsSimulate a greedy process on a W by H grid where rows and columns may be swapped to place the highest remaining value in the earliest reachable slot. | Hard8 | GreedySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Holedox MovingFind the minimum number of moves for a snake of length up to 8 to slide its head to the exit at (1,1) on a grid with stones, where the tail cell counts as blocked during a move. | Hard8 | BFSSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| CheckersOn an N x N board, decide whether one king can capture every opponent checker in a single move of consecutive diagonal jumps, and print the unique landing sequence if so. | Hard8 | DFSBacktracking+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Artificial LakeWater fills a terrain of N distinct-height platforms at 1 unit per minute; report when each platform first has 1 unit of water above it. | Hard8 | StackSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Crazy BitsGiven initial and target 12-bit register values, find the minimum number of adjacent bit swaps (within and between registers) to transform one configuration into the other, or report impossibility. | Hard8 | BFSSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Ball MachineSimulate a ball machine on a rooted tree: dropping balls follows a fixed priority path, and removing a ball makes balls above roll down; report resting node or number of moves. | Hard8 | TreeSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Optimal ProgramsFor each set of input/output pairs, find the shortest stack-machine program of at most 10 commands made of ADD, SUB, MUL, DIV, and DUP, with lexicographically smallest ties. | Hard8 | Brute forceDFS+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Fold-up PatternsGiven a planar net of unit squares with specified fold directions on shared edges, determine whether folding yields a closed surface of a solid and report its volume. | Hard8 | GeometryGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| L-system SubstringGiven a D0L system over {a,b} and a query z, decide whether z appears as a contiguous substring of some word derivable from the start word. | Hard8 | StringSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Lisa the Ladybug and the Broken CalculatorGiven a set of working calculator buttons, find the shortest sequence of presses that leaves target N on a display limited to 0..999. | Hard8 | BFSImplementation+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Pyramid GuardsTwo guards walk opposite closed quadrilateral loops on a square pyramid's surface; find the minimum straight-line distance between them while they share a face. | Hard8 | GeometryMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| International Collegiate Programming ContestGiven the exact output of a banking simulator, rebuild the canonical input: map each result line to a fixed request and choose the smallest initial balance B that keeps every request valid. | Hard8 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Catch the Bus!Given bus routes with hourly timetables and two students' start times and stops, find the earliest moment they can meet at any shared stop, considering 2-minute transfer times. | Hard8 | Shortest pathGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Board GameTwo pieces move on a small board with holes; positions cannot repeat, so decide which player wins under optimal play. | Hard8 | Game theoryGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Request for PermissionGiven a convex country, M nearest-station Voronoi cells, and a straight flight segment outside the border, list the cells the flight crosses in order. | Hard8 | GeometryBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Beware the GeoducksGiven two fixed walking routes on a weighted graph, decide whether the two travelers ever occupy the same point within t seconds, accounting for nodes with geoducks that make a traveler vanish. | Hard8 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Origin of LifeGiven a 2D cellular automaton with parameters a, b, c, find the smallest number of steps from a Garden of Eden (a state with no predecessor) to the given state, or -1 if impossible. | Hard8 | BFSSimulation+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| JengaismSimulate Jenga moves (remove a block, place it on top) and report when any structure topples because its center of gravity leaves the convex hull of its supports. | Hard8 | GeometrySimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| SnailsEach of N snails moves in a fixed direction at speed 1 and stops at the fence, at any point an earlier snail crossed, or when it meets another snail simultaneously; find when the last snail stops. | Hard8 | GeometrySimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| RobotsFind the minimum number of pushes to merge n robots (n <= 9) into one on a grid, where robots slide until blocked and plates turn them 90 degrees. | Hard8 | BFSGraph+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Flooding FieldsGiven an n by n grid, k cows, and h hourly flood levels, find the maximum number of cows that can survive by moving each hour before the water rises. | Hard8 | Dynamic programmingGraph+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Conditional StatementsParse a small nested if language, then for each checkpoint decide which variable assignments can reach it and print the forced true/false variables or unreachable. | Hard8 | SimulationImplementation+2 | No attempts yet | 10s | 128 MB | Judgeable |
| Obstacle CourseFind the minimum number of seconds to steer a sliding puck to a target on an ice rink, accelerating per second while avoiding integer-coordinate obstacles. | Hard8 | BFSSimulation+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| Obstacle CourseTap a sliding puck to change its velocity and reach a target point in the fewest seconds without touching any axis-aligned obstacle stick. | Hard8 | BFSSimulation+2 | No attempts yet | 2s | 1024 MB | Judgeable |
| RocketFind, for each rocket, the minimum fuel so its total climb with velocity floor(K/(M+T))-g reaches at least the target height H. | Hard8 | Binary searchMath+1 | No attempts yet | 1s | 1024 MB | Judgeable |
| RobotsRobots on a circular track move clockwise for given durations, pushing each other and stopping at walls; find each final position. | Hard8 | SimulationIntervals+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| Changing Phone NumbersGiven area codes and a sequence of rules (digit duplication, digit swap, area-code change) applied over time, answer queries transforming a phone number from one year to another. | Hard8 | StringSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| JaWsGiven two rows of equilateral triangles, drop the upper row onto the lower one and report where it settles or which side it slides off. | Hard8 | GeometrySimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| The Willy Memorial ProgramSimulate water filling interconnected vertical pipes through links and find when the level in a target pipe is reached. | Hard8 | GraphSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| University Entrance ExaminationGiven students with scores, home regions, and program preference lists, plus program capacities, assign students to programs under a local-region priority rule and a fairness rule. | Hard8 | ImplementationGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Museum Heist: Area of the Shadowy RegionsGiven an axis-aligned rectangle with non-overlapping rectilinear polygonal obstacles and a gun at the upper-right corner, find the total area of points no monotone beam can reach. | Hard8 | GeometrySimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| RobotsSimulate a 31x31 robot game where robots chase you, applying a tie-broken greedy movement and teleport strategy to report whether you win or lose. | Hard8 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Statistical TroubleOutput each cross table of two survey questions as raw counts and rounded row and column percentages in a fixed 6-character grid. | Hard8 | ImplementationMatrix+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Black BoxFind all 6x6 atom placements inside an 8x8 box that reproduce a set of laser entry and exit experiments, and report the layout if it is unique. | Hard8 | SimulationBrute force+2 | No attempts yet | 2s | 1024 MB | Judgeable |
| Key InsertionSimulate the recursive Insert operation on an infinite array for N keys and print the final occupancy up to the largest filled cell. | Hard8 | Union-findImplementation+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Traveling QueenFind a shortest sequence of queen moves that visits every knight, then ends next to the bishop, and among shortest paths print the lexicographically smallest. | Hard8 | BFSBit manipulation+2 | No attempts yet | 2s | 128 MB | Judgeable |
| The (Bayesian) Hound and the HareMaintain a Bayesian belief over a hare's random-walk position, apply noisy observations, and greedily move the hound to the cell with least expected maze distance. | Hard8 | ProbabilityBFS+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Equilateral DominoesGiven up to 6 equilateral dominoes with pip values 1 to 6, tile a connected subset on the triangular grid to maximize shared edges between adjacent matching ends. | Hard8 | BacktrackingGeometry+2 | No attempts yet | 15s | 128 MB | Judgeable |
| Burns' RodsGiven the six colors on each of N slices plus both end caps, decide whether some sequence of 180-degree twists makes labels share a color exactly when they share a face. | Hard8 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The 2 x 2 x 2 Rubik's CubeGiven a scrambled 2x2x2 Rubik's cube, compute the minimum number of 90-degree turns needed to solve it. | Hard8 | BFSSimulation+2 | No attempts yet | 10s | 1024 MB | Judgeable |
| Road AccidentFind which quarter-part of each car (corner plus adjacent side halves) first touches the other car during straight-line motion before impact. | Hard8 | GeometrySimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Museum TourGiven a connected graph with max degree 3 and a fixed cyclic door order per room, count starting rooms whose edge-following walk eventually traverses every corridor. | Hard8 | GraphSimulation+2 | No attempts yet | 1s | 512 MB | Judgeable |
| AntsGiven a tree tour as a 2n-bit sequence, compute the exact time when the two ants walking in opposite directions turn around for the second time, as a reduced fraction. | Hard8 | MathSimulation+2 | No attempts yet | 3s | 8 MB | Judgeable |
| Bits GeneratorCount how many of the m possible seeds make a floor-mod pseudorandom generator output a given bit string of length n. | Hard8 | MathNumber theory+2 | No attempts yet | 3s | 64 MB | Judgeable |
| GatesEach gate outputs the majority state of its inputs (0, 1/2, or 1); decide for every gate whether its state is the same across all valid circuit states. | Hard8 | ImplementationGreedy+2 | No attempts yet | 3s | 128 MB | Judgeable |
| Assembler CircuitsGiven a straight-line program of register assignments, find the fewest binary-operation gates needed to compute all final register values for every initial state. | Hard8 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Tetris AttackA stack holds each of n symbols twice; adjacent equal pairs vanish on contact, and one move swaps neighboring elements. Find the minimum swaps to empty the stack. | Hard8 | GreedyStack+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Mirror TrapGiven a rectilinear polygon, pair up its corners by tracing 45-degree laser beams that reflect off mirror walls until each beam lands in another corner. | Hard8 | GeometrySimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| LampGiven rectangular windows on two parallel walls 10 m apart and a lamp on one wall, count the windows of the lamp's building whose interior any reflected ray can reach. | Hard8 | GeometryImplementation+2 | No attempts yet | 5s | 512 MB | Judgeable |
| VouchersEach day k removes the a_k smallest remaining package sizes divisible by a_k; report which customers buy packages that hold vouchers. | Hard8 | Number theoryMath+2 | No attempts yet | 3s | 128 MB | Judgeable |
| Laser PoolA ball bounces elastically around a grid of lit horizontal and vertical laser beams; count how many distinct lit beams it touches during t time units, including the start. | Hard8 | MathSimulation+2 | No attempts yet | 5s | 256 MB | Judgeable |
| SupercomputerGiven jobs with arrival times and required processor-time, schedule them with preemption on a single 100% processor to minimize the sum of completion-minus-arrival times. | Hard8 | GreedySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| ScreensaverA point moves diagonally and reflects off a set of disjoint horizontal and vertical wall segments; report its position after t seconds. | Hard8 | GeometrySimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Jasiek's DrawingGiven a counter-clockwise walk around a polyomino's border cells, count the total number of blackened cells in the drawing. | Hard8 | GeometryImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| KeyboardA 1x2 domino slides around a grid through the single uncovered cell; find the fewest moves to uncover every vowel cell at least once. | Hard8 | GraphBFS+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Folding the MapDecide whether an n by m map with convex or concave creases folds to one square. | Hard8 | SimulationDivide and conquer+1 | No attempts yet | 1s | 128 MB | Judgeable |
| DamsEach of n sectors fills at its own rate behind dams of given heights, and you compute when water first spills past an end dam. | Hard8 | HeapUnion-find+1 | No attempts yet | 1s | 512 MB | Judgeable |
| Indiana Jones Among Zombies 2Choose the most disjoint rival pairs of zombies advancing on shortest paths to room 1 so each pair collides one step behind the other before reaching Indiana. | Hard8 | GraphShortest path+2 | No attempts yet | 4s | 128 MB | Judgeable |
| Block CompactionRepeatedly drop axis-aligned rectangles down and then left until none moves, and report the width and height of the final bounding box. | Hard8 | SimulationGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| KTX Train DepotFind the smallest number of straight tracks on which trains entering from either end before midnight can all leave toward their fixed ends on time. | Hard8 | GreedySorting+1 | No attempts yet | 5s | 128 MB | Judgeable |
| Straightening a bent wireDecide whether an axis-aligned wire can be straightened joint by joint from one end without ever touching itself during each unfolding. | Hard8 | GeometrySimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Checkmate with Two RooksGiven a king and two rooks on a chessboard, find the fewest rook moves to force checkmate under optimal play, or 0 when mate is impossible. | Hard8 | Game theoryBFS+1 | No attempts yet | 5s | 128 MB | Judgeable |
| 2D Solar SystemCircles tangent to one straight line glide with constant velocity, and the program reports when the first two touch. | Hard8 | GeometrySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Intuitionistic LogicGiven a DAG and its antichain algebra, test each formula over all variable assignments and report valid or invalid. | Hard8 | Brute forceGraph+2 | No attempts yet | 2s | 128 MB | Judgeable |