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 results1,917 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| TrójmiastoPick three of up to one million points in the plane so the sum of their three pairwise distances is smallest. | Hard8 | GeometryDivide and conquer+1 | No attempts yet | 10s | 128 MB | Judgeable |
| March of PrimalityPick a meeting point minimizing the latest arrival from N homes so the joint march still reaches the finish by time E. | Hard8 | GeometryBinary search | No attempts yet | 2s | 128 MB | Judgeable |
| Kangaroo EnclosureCount the grid cells inside the smallest convex enclosure with horizontal, vertical, and diagonal sides that covers all marked cells. | Hard8 | GeometryMath | No attempts yet | 1s | 128 MB | Judgeable |
| Wi-Fi NetworkDecide whether a point in an open square sees all two or three computers through straight segments that cross none of up to 100 walls. | Hard8 | GeometryBrute force | No attempts yet | 1s | 128 MB | Judgeable |
| Paper MapYou shift a fixed-size sheet grid over a simple polygon to minimize the sheets sharing positive area with its interior. | Hard8 | GeometryBrute force | No attempts yet | 20s | 128 MB | Judgeable |
| Contour MapGiven up to 20000 non-crossing convex orthogonal polygons, compute the maximum nesting depth where the outermost level is 1. | Hard8 | GeometrySorting+2 | No attempts yet | 3s | 128 MB | Judgeable |
| PandoraGiven the left/right turn sequence of a rectilinear polygon, count the coordinate axes it is monotone with respect to. | Hard8 | GeometryString | No attempts yet | 1s | 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 |
| Opening a RestaurantCount the grid intersections that beat every existing restaurant in distance to apartment A or to apartment B. | Hard8 | GeometrySorting+1 | No attempts yet | 5s | 128 MB | Judgeable |
| KingdomRoads merge cities into connected states over time, and each query asks how many states a horizontal line meets and how many cities those states contain. | Hard8 | Union-findSegment tree+2 | No attempts yet | 1s | 128 MB | Judgeable |
| MetalCount how many simple monotone polygons use the given n points as vertices. | Hard8 | Dynamic programmingGeometry+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Grid PanelGiven a panel with holes, find the smallest rectilinear convex region that covers every cell next to a hole plus one full row or column. | Hard8 | GeometryBrute force | No attempts yet | 1s | 128 MB | Judgeable |
| Fire TowerPlace a vertical tower on a polygonal mountain chain and find the smallest height whose top sees every point above the terrain. | Hard8 | GeometryBinary search | No attempts yet | 1s | 128 MB | Judgeable |
| Depth OrderGiven a pixel image of overlapping axis-aligned rectangles, decide whether it is realizable and report the possible depth range of one queried rectangle. | Hard8 | Topological sortGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Intelligent RobotsDecide whether a square robot moving only horizontally and vertically can leave the bounding rectangle of a rectilinear polygon without touching it. | Hard8 | GeometryGraph+1 | No attempts yet | 1s | 128 MB | Judgeable |
| PCBPlace two clocks and assign each of N points to one clock of capacity K to minimize the largest Manhattan distance from a point to its clock. | Hard8 | GeometryBinary search | No attempts yet | 1s | 128 MB | Judgeable |
| CastlesFind the minimum Manhattan distance between any west-bank castle and any east-bank castle from two monotone chains. | Hard8 | GeometrySorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| StainsTaeyeon covers integer points off the x-axis with diamonds centered on the x-axis and minimizes the sum of their areas. | Hard8 | Dynamic programmingGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Sewerage PlanningFind the line through the rectangle that maximizes the minimum distance to the given points. | Hard8 | GeometryBinary search | No attempts yet | 1s | 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 |
| Indisputable RightGiven antennas on a ridge of triangular mountains, find the fewest extra antennas on the ridge that connect all of them by line of sight. | Hard8 | GeometryGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The Avaricious ISPChoose two disjoint disks over weighted points to maximize the product of the covered weight sums. | Hard8 | GeometrySorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| GaragePlace the fewest axis-aligned w by h garages inside a W by H lot so no additional garage fits without moving them. | Hard8 | GeometryMath+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Golf FieldChoose four of up to 30000 points in the plane so their convex hull has the largest possible area. | Hard8 | GeometryTwo pointers | No attempts yet | 2s | 128 MB | Judgeable |
| Janeway's JourneyFind the single straight line that hits the greatest number of disjoint circular asteroids in the plane. | Hard8 | GeometrySorting+1 | No attempts yet | 40s | 128 MB | Judgeable |
| Cleaning the HallwayGiven up to 500 outlets, each cleaning the ring swept by a small disk around a circle, compute the area of their union rounded to two decimals. | Hard8 | GeometryMath+1 | No attempts yet | 5s | 128 MB | Judgeable |
| Safari ParkTriangles are inserted one at a time and each query asks which earlier triangle strictly contains a point, reporting -1 on a boundary and 0 outside. | Hard8 | GeometryTree | No attempts yet | 5s | 128 MB | Judgeable |
| TV TransmittersSome rooftops hold transmitters, buildings block their straight rays, and the total length of ground that sees one transmitter is printed as a reduced fraction. | Hard8 | GeometryIntervals+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Highway of the FutureGiven each car entry time and speed, compute the largest number of cars at the same spot at the same time on a 100-unit highway. | Hard8 | GeometrySorting+2 | No attempts yet | 10s | 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 |
| Wedding HallFind the largest L-shaped hall of three equal squares that fits inside a walled garden without enclosing any tree. | Hard8 | GeometryBinary search+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The MotorwayGiven sorted entry positions, find the smallest and largest even toll spacing that puts one entry between consecutive tolls, printed as reduced fractions. | Hard8 | MathGeometry+1 | No attempts yet | 6s | 128 MB | Judgeable |
| Rent-A-PixelCompute the smallest row- and column-convex block set containing the given blocks and print its outline corners clockwise. | Hard8 | GeometryIntervals+1 | No attempts yet | 3s | 128 MB | Judgeable |
| Tree LightingA point light shines a bounded wedge upward through absorbing and mirrored segments, and you report the lit percentage of a horizontal house front. | Hard8 | GeometrySimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Sensor NetworkFind the largest group of sensors where every pair lies within distance d and print its size and members. | Hard8 | BacktrackingGraph+1 | No attempts yet | 2s | 128 MB | Judgeable |
| TribesRepeatedly merge axis-aligned rectangles whose overlap has positive area into their bounding box, then print the remaining boxes in lexicographic order. | Hard8 | Union-findSegment tree+2 | No attempts yet | 3s | 1024 MB | Judgeable |
| Super Mario 169Choose the switch order and the coin pickup routes in 3D so Mario collects every coin with the least total swim distance. | Hard8 | Dynamic programmingGeometry+1 | No attempts yet | 3s | 256 MB | Judgeable |
| Floor PaintingFind the side length of the largest axis-aligned square that fits inside a given orthogonal simple polygon. | Hard8 | GeometryBinary search | No attempts yet | 2s | 256 MB | Judgeable |
| L∞ JumpsMake exactly n jumps of L-infinity length d from (0,0) to (s,t), minimizing total cost where each jump's direction is ranked from a given offset. | Hard8 | Divide and conquerGeometry+2 | No attempts yet | 3s | 256 MB | Judgeable |
| Shrine MaintenanceSplit the shrines on a circle of radius 1000 among W workers leaving from the center so the longest round trip is as short as possible. | Hard8 | Dynamic programmingGeometry+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Watch, Man!Decide whether guards cover each art piece at its required level when segment and arc walls block sight lines. | Hard8 | GraphGeometry | No attempts yet | 1s | 256 MB | Judgeable |
| Galaxy collisionYou split the points into two groups whose internal distances exceed 5 and minimize the smaller group. | Hard8 | GraphBFS+2 | No attempts yet | 3s | 256 MB | Judgeable |
| MarblesPlace three pairwise disjoint axis-aligned rectangles to maximize red marbles in the first plus blue in the second plus green in the third. | Hard8 | GeometryPrefix sum+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Mountainous landscapeFor each segment of a left-to-right polygonal chain, find the nearest later segment with a point strictly above the ray extending the segment. | Hard8 | GeometryStack | No attempts yet | 10s | 256 MB | Judgeable |
| Around the TrackFind the shortest closed route that stays between two nested polygons and winds once around the inner one. | Hard8 | GeometryShortest path+1 | No attempts yet | 2s | 256 MB | Judgeable |
| ContainmentYou pick a set of grid cells covering all failing cells so the number of boundary faces is as small as possible. | Hard8 | GraphGeometry | No attempts yet | 20s | 256 MB | Judgeable |
| Damage AssessmentCompute the remaining gasoline volume in a tilted cylindrical tank with spherical caps from the tilt and liquid level. | Hard8 | GeometryMath | No attempts yet | 1s | 256 MB | Judgeable |
| Line Fitting Under UncertaintyFind the line that minimizes the worst expected absolute deviation from uncertain sample values and print that error. | Hard8 | Binary searchGeometry+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Polygon GuardsPlace the fewest guards on vertices of an orthogonal simple polygon with under 40 vertices so every vertex is visible from a guard. | Hard8 | GeometryBrute force+2 | No attempts yet | 5s | 128 MB | Judgeable |
| Molecule Pair Distance HistogramFrom molecule counts on an N by N grid, find the mean pairwise Euclidean distance and the count of pairs at each squared distance. | Hard8 | Divide and conquerMatrix+2 | No attempts yet | 10s | 512 MB | Judgeable |
| Fallen Apples and the Nearest TreeFor each yearly apple drop on a grid, output the squared Euclidean distance to the nearest existing tree, counting the new tree only from the next year. | Hard8 | GeometryDynamic programming+2 | No attempts yet | 2s | 128 MB | Judgeable |
| PutterCount the orders in which a single bouncing shot from inside a convex polygon can hit each wall exactly once. | Hard8 | GeometryBrute force | No attempts yet | 8s | 512 MB | Judgeable |
| Fire Truck DispatchFind the shortest drive along roads from any station to a point within hose radius R of each fire, printing -1 when no such point can be reached. | Hard8 | Shortest pathGeometry+1 | No attempts yet | 15s | 256 MB | Judgeable |
| Fencing the HerdThe herd grows over time and each query asks whether every cow so far lies strictly on one side of the given line. | Hard8 | GeometryBinary search | No attempts yet | 2s | 256 MB | Judgeable |
| AsteroidsFind the positive time when two steadily moving convex polygons share their largest overlap area, or report the first touch or never. | Hard8 | GeometryMath | No attempts yet | 2s | 256 MB | Judgeable |
| Hexagon travelCount the orders of L left turns, R right turns and M moves that leave a hex-grid robot on a red, green, or blue tile, modulo 1,000,000,007. | Hard8 | Dynamic programmingCombinatorics+2 | No attempts yet | 2s | 32 MB | Judgeable |
| CrowSum the shortest path lengths between consecutive query points that stay above the ground and outside a polygonal mountain. | Hard8 | GeometryShortest path+1 | No attempts yet | 3s | 256 MB | Judgeable |
| Complex Paper FoldingTry every vertex-to-vertex fold of a convex polygon and report the perimeter of the result with the most vertices. | Hard8 | GeometryBrute force | No attempts yet | 1s | 256 MB | Judgeable |
| Proud PenguinDistribute at most W units of water into level pools along a polygonal track to minimize the tallest uphill stretch penguins must climb. | Hard8 | Binary searchGreedy+1 | No attempts yet | 3s | 256 MB | Judgeable |
| Shibuya CrossingGiven the list of crossing path pairs, find the size of the largest group of people whose paths all cross each other. | Hard8 | GraphDynamic programming+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Area of EffectPick a circle of radius at most r that avoids the interiors of the village circles and covers as many minion points as possible. | Hard8 | GeometryBrute force | No attempts yet | 5s | 256 MB | Judgeable |
| Stacked Colored PaperAfter gluing up to 200 triangles and circles in order, print each sheet's visible area after every prefix of the stack. | Hard8 | GeometryMath | No attempts yet | 1s | 512 MB | Judgeable |
| Visitors' TrainCompute the total length of a straight track segment from which the main rectangle stays fully visible behind other rectangles. | Hard8 | GeometryIntervals | No attempts yet | 1s | 256 MB | Judgeable |
| Kingdom TripFind the shortest subsequence from the first to the last point so every skipped point lies within distance d of its shortcut segment. | Hard8 | Dynamic programmingGeometry | No attempts yet | 2s | 256 MB | Judgeable |
| Path Inside a HistogramCompute the sum of shortest inside-polygon distances from the base vertex to many boundary points in a rectilinear histogram. | Hard8 | GeometryShortest path | No attempts yet | 2s | 256 MB | Judgeable |
| Pyramid BaseFind the side length of the largest axis-aligned square on a grid that avoids all given rectangular obstacles. | Hard8 | Binary searchGeometry+2 | No attempts yet | 5s | 128 MB | Judgeable |
| Flight Plan EvaluationGiven continent polygons and flight waypoints on a sphere, compute the total flight length and the share flown over water. | Hard8 | GeometryMath | No attempts yet | 6s | 256 MB | Judgeable |
| Hole in OneFind the most walls a ball shot from the origin can destroy by bouncing off axis-aligned walls before dropping into the hole. | Hard8 | BacktrackingGeometry+1 | No attempts yet | 5s | 256 MB | Judgeable |
| MidpointCount the triples (i, j, k) from three collinear point sets in which C_k is the midpoint of A_i and B_j. | Hard8 | GeometryMath+1 | No attempts yet | 10s | 256 MB | Judgeable |
| HypercubeDecide whether a tree-like polycube of eight cubes folds along shared faces into the surface of a four-dimensional hypercube. | Hard8 | BacktrackingGeometry | No attempts yet | 1s | 256 MB | Judgeable |
| Sunlight on a TreeReport all nodes on the tree path from u to v whose dot product with the query direction is minimal. | Hard8 | TreeSegment tree+1 | No attempts yet | 5s | 256 MB | Judgeable |
| Stop Making SenseFor each input point in turn, remove it and report the area of the smallest convex polygon enclosing the rest. | Hard8 | GeometrySorting+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Rain AgainFind the fewest leading drops so every W by H rectangle inside the L by L pot contains a drop strictly inside, or report -1. | Hard8 | Binary searchSegment tree+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Mowing the FieldCount interior crossings of perpendicular mower segments cut at least T days apart. | Hard8 | Segment treeGeometry+1 | No attempts yet | 5s | 512 MB | Judgeable |
| FaultGiven diagonal fault shifts with surface erosion, report the original depth of the layer exposed at each unit of the surface. | Hard8 | Segment treeGeometry | No attempts yet | 2s | 256 MB | Judgeable |
| Don't Break the Nile (Large)Compute the maximum unit flow from the south edge to the north edge of a grid blocked by up to 1000 rectangles. | Hard8 | Shortest pathGraph+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Xeno-archaeology (Large)From tile positions and colors in infinite alternating square rings, find the fitting center nearest the origin or report the tiles as too damaged. | Hard8 | MathGeometry+1 | No attempts yet | 5s | 512 MB | Judgeable |
| The peak that looks highestGiven each peak's apparent-highest peak ahead, assign integer heights matching all sightings and print the lexicographically smallest heights or Impossible. | Hard8 | GeometryBacktracking+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Hall of MirrorsCount the directions from the center of a mirrored grid room in which a ray returns to the viewer within distance D under the given reflection rules. | Hard8 | GeometrySimulation | No attempts yet | 5s | 512 MB | Judgeable |
| Hall of Mirrors (Large)Count the directions in which a ray from your cell returns to its exact center after mirror reflections within distance D. | Hard8 | GeometrySimulation+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Ninjutsu (Small)Cut the rope to any length up to R so the counterclockwise swing bends around the maximum number of point targets. | Hard8 | GeometryBacktracking | No attempts yet | 5s | 512 MB | Judgeable |
| Grazing GoatsFor each candidate bucket point, fix each rope at its pole distance and compute the area shared by all disks. | Hard8 | Geometry | No attempts yet | 5s | 512 MB | Judgeable |
| Minimum Triangle PerimeterGiven up to 10000 points, find three whose triangle has the smallest total perimeter, with collinear triples allowed. | Hard8 | GeometryDivide and conquer+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Minimum Triangle PerimeterGiven up to a million integer points, pick three that form the triangle of smallest perimeter and report that perimeter. | Hard8 | GeometryDivide and conquer+1 | No attempts yet | 90s | 512 MB | Judgeable |
| Two Lights in a Square RoomGiven two point lights and up to 50 circular pillars inside a square, find the area lit by neither, by red only, by green only, and by both. | Hard8 | GeometryImplementation+2 | No attempts yet | 40s | 512 MB | Judgeable |
| Watering PlantsGiven N disjoint disks, find the smallest radius R such that two disks of radius R can cover all the plants. | Hard8 | GeometryBinary search+2 | No attempts yet | 5s | 512 MB | Judgeable |
| How Big Are the Pockets? (Large)A run-length-encoded turtle walk traces a simple closed lattice polygon; compute the total area of all points outside it that have boundary both east and west or both north and south. | Hard8 | GeometrySimulation+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Minimum transmitter powerPlace a flagship in 3D so the maximum weighted Manhattan distance to N ships is minimized, and report that minimum power rounded to six decimals. | Hard8 | GeometryBinary search+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Fly Swatter (Small)Compute the probability that a randomly placed fly disk touches a circular ring crossed by a grid of cylindrical strings, and print it to six decimals. | Hard8 | GeometryMath+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Fly Swatter (Large)Given the racquet geometry, compute the probability that a fly of radius f, centered uniformly in the outer circle, overlaps the ring or any string. | Hard8 | GeometryMath+2 | No attempts yet | 20s | 512 MB | Judgeable |
| Half-plane land grabLines are added one at a time, and after each addition you must report the maximum y value over all added lines at a given x. | Hard8 | GeometryDynamic programming+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Relay SignalCount boats reachable within one relay hop from boat 1, where visibility means the connecting segment never enters the convex island interior; every coordinate is a lattice point. | Hard8 | GeometrySorting+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Red segments and blue segmentsColor N points red or blue, then draw non-crossing same-color segments so that no red and blue segment touch; maximize total segment scores. | Hard8 | Dynamic programmingGeometry+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Run and Swim RaceGiven each runner's running and swimming speeds, find every participant who can finish first for some positive choice of the leg lengths R and S. | Hard8 | GeometrySorting+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Polygon GameTwo players alternately draw chords inside a convex N-gon that avoid all earlier chords, including shared endpoints; decide the winner under optimal play. | Hard8 | Game theoryCombinatorics+2 | No attempts yet | 2s | 512 MB | Judgeable |
| SymmetryGiven up to 1000 distinct lattice points, find the minimum number of extra points needed to make the set symmetric about some point or some line. | Hard8 | GeometryHash map+2 | No attempts yet | 5s | 512 MB | Judgeable |
| FenceGiven points on grid corners, find the shortest closed fence along cell edges and diagonals that encloses all of them, output as a + b*sqrt(2). | Hard8 | GeometrySorting+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Shortest BridgeGiven two polygonal riverbanks and points s and t on opposite sides, minimize the bridge length between the banks, then the road lengths from s and t to its endpoints. | Hard8 | GeometryBrute force+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Square in CirclesGiven overlapping circles centered on the x-axis, find the side length of the largest axis-aligned square that fits inside their union. | Hard8 | GeometryBinary search | No attempts yet | 8s | 512 MB | Judgeable |
| Color the Map ExtremeGiven simple polygons for each country, decide adjacency when borders share a positive-length segment, then find the chromatic number of the adjacency graph. | Hard8 | GeometryGraph+1 | No attempts yet | 8s | 512 MB | Judgeable |