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,924 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| IntervalsGiven a point light above the x-axis and non-overlapping circular pipes below it, find the shadowed intervals on the x-axis, sorted and rounded to two decimals. | Hard8 | GeometrySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Strictly Inscribed Similar TrianglesFor each triangle and angle theta, count how many strictly inscribed triangles similar in order to the given triangle exist with a chosen edge at that angle. | Hard8 | GeometryMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Doing WindowsGiven a screen and four windows with fixed aspect ratios, decide whether the windows can be resized and placed to tile the screen with no gaps or overlaps. | Hard8 | GeometryMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| StarsCount and find the brightest occurrence of each constellation pattern as a direct similarity transform of integer points within a star map. | Hard8 | GeometryHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Simple PolygonGiven up to 40,000 points defining a closed polygon, decide whether its edges only meet at shared endpoints (simple) or intersect anywhere (NO). | Hard8 | GeometrySorting+2 | No attempts yet | 10s | 128 MB | Judgeable |
| No SmokingGiven up to 200 disjoint rectangles in a town rectangle, decide whether some point in the town lies at distance at least D minus 0.1 from every building. | Hard8 | GeometryUnion-find+2 | No attempts yet | 3s | 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 |
| Robotic RailsGiven up to 100 line segments in the plane, find the shortest path from a fixed start point and heading to a fixed target point and heading, where turns at intersections may not exceed 90 degrees. | Hard8 | GraphGeometry+2 | No attempts yet | 10s | 128 MB | Judgeable |
| Paper CuttingFor each test case, decide whether an A by B grid of C by D cards fits on an E by F sheet in some rotation, then report the minimum number of straight cuts needed to separate the cards. | Hard8 | MathGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Subway PlanningGiven points in the plane and a radius d, cover all points using the fewest rays from the origin, where a ray covers a point if some point on the ray is within distance d. | Hard8 | GeometryGreedy+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 |
| Connected GheevesGiven two convex funnel-shaped containers joined at the bottom, find the water level reached after pouring a given area of water, capped at the lower rim. | Hard8 | GeometryBinary search+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Rotating ScoreboardGiven a simple polygon, decide whether some interior point sees every boundary point, which happens exactly when the polygon's kernel is nonempty. | Hard8 | GeometryImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| ACM UndergroundGiven metro lines, policemen on them, and two points, decide whether the destination is reachable without ever being checked, where checks happen at line changes and at non-intersection spots on lines. | Hard8 | GeometryGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Transforming CometsGiven two cyclic sequences of integer points, decide whether one is a rotation, uniform positive scaling, and translation of the other, and report the matching cyclic offset. | Hard8 | String matchingGeometry+2 | No attempts yet | 5s | 512 MB | Judgeable |
| The Winds of WarChoose a convex net containing the origin that covers as many enemy units as possible while covering as few friendly ones, and report the maximum difference. | Hard8 | GeometrySorting+2 | No attempts yet | 2s | 512 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 |
| 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 |
| Concentration CardsGiven N cards of size W by H that can each be rotated, tile a filled rectangle with them and find the smallest possible perimeter. | Hard8 | MathGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| CubeGiven an n by n by n grid of letters, decide whether the connected same-letter pieces can be pulled apart without cutting, meaning no single piece separates the cube. | Hard8 | GraphDFS+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 |
| Chain-Confined PathFor a chain of circles where consecutive circles overlap, find the shortest path from the first center to the last center that stays inside the union of the circles. | Hard8 | GeometryShortest path+2 | No attempts yet | 1s | 128 MB | Judgeable |
| CloudsEach cloud is a polygon moving with the same velocity; count the separate time intervals during which the vertical beam at the origin intersects at least one cloud. | Hard8 | GeometrySorting+2 | No attempts yet | 2s | 128 MB | Judgeable |
| CircleGiven grid side k and circle radius r centered at a grid vertex, count cells the circle passes through, excluding cells touched only at a corner. | Hard8 | MathGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Similar PolygonsDecide whether two polygons are similar, and if so print the square of the similarity factor as a reduced fraction and the matching vertex index in the second polygon. | Hard8 | GeometryString matching+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| Similar PolygonsDecide whether two polygons are similar under rotation, reflection, translation, and scaling, then output the exact squared similarity ratio and the smallest matching vertex index. | Hard8 | GeometryString matching+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| Intercepting MissilesGiven moving bombers and passenger planes plus fixed missile launchers, find the maximum number of bombers that can be shot down without hitting any passenger plane. | Hard8 | GeometryBinary search+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Map LabelerGiven city points in the plane, find the largest square label size so that each label has its city at the midpoint of its top or bottom edge and no two label interiors overlap. | Hard8 | Binary searchGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Blue x Red = BangGiven up to nine blue and nine red points, decide whether a simple blue polygon and a simple red polygon can be drawn with disjoint interiors and boundaries. | Hard8 | GeometryBrute force+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 Bermuda TriangleGiven a regular hexagon of side s and allowed equilateral triangle sizes, decide whether the hexagon can be tiled exactly by triangles of those sizes. | Hard8 | BacktrackingGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Color TunnelsGiven a color sequence and colored line-segment tunnels, find the shortest path from source to destination that traverses tunnels in the required color order. | Hard8 | GeometryShortest path+1 | 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 |
| FarmlandGiven a planar graph of farming regions, count the proper regions bounded by a simple cycle with no interior vertices or edges and exactly k boundary edges. | Hard8 | GraphGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Farmer Bill's ProblemPlace non-overlapping, non-touching rectangles inside a rectangular field so all given circles lie within them, minimizing total rectangle area, and output the remaining harvestable area. | Hard8 | GeometryDynamic programming+2 | No attempts yet | 2s | 128 MB | Judgeable |
| HypertransmissionGiven N points in 3D each labeled 0 or 1, choose a squared radius R^2 to maximize the number of points where opposite-label neighbors outnumber same-label ones, then report that maximum and the smallest R^2 achieving it. | Hard8 | SortingPrefix sum+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Inlay CuttersCount all 45-degree right isosceles triangles formed by grid-aligned cuts and diagonals on an M by N plate after K straight cuts. | Hard8 | GeometryImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| LibraryGiven shelf and peg geometry in a niche, find a redesign that seats a fixed tome on one shelf while minimizing pegs moved and plank cut. | Hard8 | GeometryBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| FrontierChoose a subset of the polygon's vertices, in clockwise order, forming a convex polygon that strictly contains all given points, minimizing its perimeter. | Hard8 | GeometryDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| FenceCompute the total illumination reaching the lit parts of a polygonal fence from a point lamp, accounting for shadows and the cosine obliquity factor. | Hard8 | GeometryImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| EllipseGiven five integer points, either report that no unique ellipse passes through them or compute that ellipse's area to six decimals. | Hard8 | GeometryMath+2 | No attempts yet | 2s | 64 MB | Judgeable |
| JoggingGiven N pairs of one-way moving walkway lines in the plane with boarding and leaving costs, find the minimum travel time from house to office where walking off-line is allowed. | Hard8 | Shortest pathGeometry+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Box ArtGiven a bounding box and up to 2000 axis-aligned boxes, compute the volume of their union clipped to the bounding box. | Hard8 | GeometrySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| FrogGiven axis-aligned non-touching squares in the first quadrant and a jump reach d, find the largest x+y over squares reachable from the square at the origin. | Hard8 | GraphBFS+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Lattice Points in the Union of CirclesCount integer lattice points inside the union of up to 10,000 circles, restricted to the coordinate box from -16383 to 16384. | Hard8 | GeometrySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The RaceCount all overtakes among spaceships with given starting positions and speeds, then list the first 10000 in time order. | Hard8 | SortingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Fish CatchGiven a fixed net center and N fish moving at constant velocity, find the smallest radius that catches at least K fish at some time t >= 0. | Hard8 | GeometryBinary search+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Space BoomerangGiven M direction vectors in N-dimensional space, find every vector that cannot appear with a nonzero coefficient in any linear combination summing to zero. | Hard8 | MathGeometry+1 | No attempts yet | 3s | 128 MB | Judgeable |
| Empty TrianglesGiven N lines with no three concurrent, count the triangles whose interior is not crossed by any other line. | Hard8 | GeometryCombinatorics+1 | No attempts yet | 2s | 512 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 |
| Globulous GumdropsGiven spheres of radii r_i and a tube of diameter d, find the shortest cylinder length holding them all. | Hard8 | GeometryDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Planet HuntingGiven the moon's positions at three times and the planet's period, find the star to planet distance by solving for the orbital phase. | Hard8 | GeometryMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Cover All Points with Three SquaresFind the smallest integer side length d so that three axis-aligned d×d squares can cover all N given points. | Hard8 | Binary searchGreedy+2 | No attempts yet | 2s | 64 MB | Judgeable |
| Painting PatternsCount grid cells painted black by up to N rectangle operations, each applying one of three periodic patterns under OR overlap. | Hard8 | GeometryPrefix sum+2 | No attempts yet | 2s | 64 MB | Judgeable |
| Collision of AsteroidsGiven two moving convex hulls in 3D, decide whether they overlap at some past or future time. | Hard8 | GeometryBinary search+1 | No attempts yet | 1s | 16 MB | Judgeable |
| Union Area of TrianglesGiven right isosceles triangles with axis-parallel legs and hypotenuse of slope -1, compute the area of their union. | Hard8 | GeometrySegment tree+2 | No attempts yet | 1s | 32 MB | Judgeable |
| GridGiven n points, decide whether there exist an axis-aligned grid of evenly spaced lines and a straight line whose intersection set is exactly those points. | Hard8 | GeometryMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| CorridorFind the largest radius of a sphere that can travel west to east through a corridor, where point pillars and the two side walls block it. | Hard8 | GraphShortest path+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Almost ClearGiven two disjoint convex polygons A and B and a point C outside both, decide whether B hides none, part, or all of A as seen from C. | Hard8 | GeometryBinary search+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Worst LocationsGiven a perfect binary tree and two distance-from-leaf descriptions, decide whether some pair of matching vertices sits farther than Z apart. | Hard8 | TreeGeometry+2 | No attempts yet | 1s | 128 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 |
| Closest PointFor each of N points, output the squared distance to the nearest other point. | Hard8 | Divide and conquerSorting+2 | No attempts yet | 3s | 128 MB | Judgeable |
| The PicnicGiven up to 99 points, find the largest convex polygon whose vertices are points and whose interior contains no other point. | Hard8 | GeometryDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The Curious PrinceFind the shortest path along the surface of a convex polyhedron between two given points. | Hard8 | GeometryShortest path+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Hallucinogenic CarnationsFor each of up to 10000 polygons, sum the carnations in grid parcels whose area at least half lies inside the polygon. | Hard8 | GeometryPrefix sum+1 | No attempts yet | 1s | 128 MB | Judgeable |
| RadioGiven a circle and a simple polygon, compute the area of the polygon's interior that lies inside the circle. | Hard8 | GeometryArray | No attempts yet | 1s | 128 MB | Judgeable |
| Special Forces ManoeuvresDiscs cover the plane; find the smallest prefix of the given order whose union already covers the entire plane, or report NIE if no prefix does. | Hard8 | GeometryBinary search+2 | No attempts yet | 3s | 512 MB | Judgeable |
| P-Broken-LineFind the minimum number of axis-parallel unit-free segments in an orthogonal polyline from A to B that avoids all n given axis-parallel obstacles. | Hard8 | BFSGraph+2 | No attempts yet | 3s | 512 MB | Judgeable |
| Empty CuboidsGiven up to 5000 integer points, find the largest axis-aligned box anchored at the origin whose strict interior contains none of the points, and output its volume. | Hard8 | SortingTwo pointers+2 | No attempts yet | 3s | 128 MB | Judgeable |
| RocketsMatch the n red points to the n white points with non-crossing segments so the total Euclidean length is minimum, and report the matching. | Hard8 | Dynamic programmingDivide and conquer+2 | No attempts yet | 1s | 128 MB | Judgeable |
| AltarsFor each rectangle temple, decide whether a ray from its center can exit through the half-wall entrance and escape to infinity without touching any rectangle. | Hard8 | GeometryImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| PolygonGiven a convex polygon and its triangulation, find the maximum number of triangulation triangles a single elementary triangle can intersect. | Hard8 | GeometryDynamic programming+1 | No attempts yet | 1s | 128 MB | Judgeable |
| WindowGiven an orthogonal polygon and an axis-parallel window, count how many separate interior fragments of the polygon are visible through the window. | Hard8 | GeometryImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Flat Broken LinesGiven n points, find the minimum number of flat broken lines (each moving right with segment slopes between -1 and 1) needed to cover all points. | Hard8 | GreedySorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| CastleGiven an orthogonal simple polygon with corridor grid lines inside it, find the shortest path along grid lines between two marked lattice points. | Hard8 | GraphShortest path+1 | No attempts yet | 1s | 128 MB | Judgeable |
| WarehouseFind a crossroads minimizing the weighted sum of Chebyshev distances to n shops. | Hard8 | GeometryBinary search+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The InvasionGiven a convex polygon with n vertices and m weighted points, find three polygon vertices forming a triangle with the maximum total weight of points inside or on it. | Hard8 | GeometryTwo pointers+2 | No attempts yet | 3s | 64 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 |
| SheepCount triangulations of a convex n-gon by non-crossing diagonals such that no diagonal passes through a sheep's spot and every triangle holds an even number of spots, modulo m. | Hard8 | Dynamic programmingGeometry+2 | No attempts yet | 3s | 512 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 |
| PlotPartition a sequence of n points into at most m contiguous groups, replacing each group with one point, to minimize the maximum distance from any original point to its group's representative. | Hard8 | Binary searchDynamic programming+2 | No attempts yet | 30s | 128 MB | Judgeable |
| TapestriesDecide whether a point strictly inside a simple polygon sees each edge as entirely lit or entirely dark, matching a given lit/dark pattern per wall. | Hard8 | GeometryDivide and conquer | No attempts yet | 1s | 128 MB | Judgeable |
| ScissorsGiven a rectilinear simple polygon, find the minimum number of drawn segments (each with endpoints on the boundary and interior inside) so that cutting along them makes every piece a rectangle. | Hard8 | GeometryGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| FosaGiven horizontal and vertical segments, find the largest axis-aligned square whose entire perimeter lies on those segments, or report that none exists. | Hard8 | GeometrySorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| TrailsFor each axis-aligned unit-height tape, count the connected pieces of the bytecurve of order n that lie inside the rectangle. | Hard8 | Divide and conquerRecursion+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Map 2Count integer starting points (a,b) such that each of the four diagonal quadrants around (a,b) contains at least one of n marked points. | Hard8 | SortingPrefix sum+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Near 2Given n tree points and m apple points, find the minimum over all apples of the Manhattan distance to the nearest tree. | Hard8 | Divide and conquerGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| CloudsGiven disjoint simple polygons and a fixed wind direction, place a point so the number of polygons that cross the vertical ray above it at some time is maximized. | Hard8 | GeometrySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| SegmentsGiven n disjoint vertical segments, find the maximum possible number of pairs that can see each other via an unobstructed horizontal segment. | Hard8 | GeometryCombinatorics+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Straight LinesGiven two crossing lines and an integer point, find the integer point in the same region that is closest to the intersection, breaking ties lexicographically. | Hard8 | GeometryMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The TempleGiven circles (columns) and two points, find the shortest path between the points that cannot pass through any circle. | Hard8 | GeometryGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Sum of PolygonsAdd two convex polygons by Minkowski sum and print twice the area of the resulting polygon. | Hard8 | GeometryTwo pointers+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 |
| NinjaGiven n points in the plane, decide whether two disjoint non-crossing polylines can connect point 1 to 2 and point 3 to 4 using points as vertices. | Hard8 | GeometryGraph | No attempts yet | 1s | 128 MB | Judgeable |
| Express DeliveryGiven a depot and clients with distinct x and y coordinates, find the fewest monotone (shortest-path) routes from the depot that cover all clients. | Hard8 | GreedySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Spy SatellitesGiven a terrain polyline with some marked points, place satellites on the line y=H so their visibility segments cover all marked points, minimizing the count. | Hard8 | GeometryGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| BajtoriSelect a subset of squares to maximize the sum of the squared red total and squared green total. | Hard8 | GeometrySorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Fence In Godzilla!The task is to find the smallest nonzero area among triangles with vertices from n points. | Hard8 | GeometrySorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| VirusesGiven up to 24 virus sources with distinct daily hours, determine how many cells each one ends up occupying on an n by n board. | Hard8 | GeometryBFS+2 | No attempts yet | 1s | 128 MB | Judgeable |