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
TitleLevelTopicsSolvedTime limitMemory limitJudge
Space MinerTravel in straight segments through ordered 3D waypoints; for each planet, check whether any segment passes within distance ri+D of its center, then sum the resources of all planets you can reach at least once.Medium6GeometryImplementation+2No attempts yet2s512 MBJudgeable
Invasion of the BoxesSimulate a laser ray from the origin that destroys axis-aligned boxes and reflects off them, printing the order of destruction.Medium6GeometrySimulation+1No attempts yet1s128 MBJudgeable
CowsGiven up to 10000 tree coordinates, find the largest convex polygon using any subset as corners, then output its area divided by 50 rounded down.Medium6GeometrySorting+2No attempts yet1s128 MBJudgeable
Tin Can TelephoneCount how many polygon buildings touch or cross the straight segment between two windows, where touching a corner or edge blocks the view.Medium6GeometryImplementation+2No attempts yet1s128 MBJudgeable
R & JGiven two ships and n spheres in 3D, count how many spheres the segment between the ships intersects.Medium6GeometryMath+2No attempts yet1s128 MBJudgeable
FractalsDraw a level-`level` block fractal of given width from (0,1) to (width,1) and list, in order, every integer y where the vertical line x meets a segment.Medium6RecursionImplementation+2No attempts yet1s128 MBJudgeable
DuathlonGiven each competitor's running and cycling speeds and a fixed total distance, choose the run and cycle legs so the last competitor wins by the largest margin, or report that no such split exists.Medium6GeometryMath+2No attempts yet1s128 MBJudgeable
Connect the CampusGiven N points in the plane and some already-built zero-cost edges, add edges connecting all points at minimum total Euclidean length.Medium6Minimum spanning treeUnion-find+2No attempts yet1s128 MBJudgeable
Sheep and CoyotesGiven sheep points in a square, find which sheep is nearest to some entry point on the south edge, possibly selected when there is a tie.Medium6GeometrySortingNo attempts yet1s128 MBJudgeable
Extension CordsDecide whether the extension cords can be split into two groups, each long enough to reach a different-circuit outlet from one work location.Medium6GreedySorting+2No attempts yet1s128 MBJudgeable
Maple RoundupGiven up to 99 points, find the convex hull by repeatedly turning right through the smallest angle, and output its perimeter rounded to two decimals.Medium6GeometrySorting+2No attempts yet1s128 MBJudgeable
DiamondsFor each count Pmin, find the smallest radius whose worst-case center covers at least Pmin points, then the best coverage at that radius.Medium6GeometryPrefix sum+2No attempts yet1s128 MBJudgeable
BilliardsA ball starts 13 from side R and 29 from side D and moves straight from a cue point on R, reflecting off the sides; find its distances from R and D after n centimeters.Medium6MathGeometry+2No attempts yet1s128 MBJudgeable
The Folded SheetA rectangle is folded along a segment connecting points on two adjacent edges; find the area of the union of the folded part and the remaining sheet.Medium6GeometryMath+2No attempts yet1s128 MBJudgeable
FireworksA firework splits into two 45-degree branches after each vertical stage; count the distinct grid squares colored across all stages.Medium6SimulationDFS+2No attempts yet2s1024 MBJudgeable
UnfoldungFor each cube-built surface, decide whether its graph splits along cut edges, and if not, whether the surface can be unfolded flat.Medium6GraphDFS+2No attempts yet1s128 MBJudgeable
Dolphin PoolGiven up to 20 circles with disjoint centers, count the bounded regions outside all circles that the circles enclose.Medium6GeometryGraph+1No attempts yet1s128 MBJudgeable
Counting RectanglesCount rectangles whose four corners are all intersection points of horizontal and vertical segments in a figure.Medium6GeometryHash map+2No attempts yet1s128 MBJudgeable
WatchdogFind an integer roof point where a leash can be tied so the dog reaches every hatch but the leash never crosses the roof edge.Medium6GeometryBrute force+2No attempts yet1s128 MBJudgeable
BricksGiven a rectangular brick and a rectangular hole, decide whether the brick can pass through the hole in any orientation.Medium6GeometryMath+1No attempts yet1s128 MBJudgeable
Cricket FieldGiven up to 100 tree points in a W by H rectangle, find the largest axis-aligned square inside the park with no tree strictly inside it.Medium6GeometryBrute force+1No attempts yet2s128 MBJudgeable
Toxic BarrierFind the convex hull of N points and add a buffer of distance L around it, giving the minimum closed barrier length rounded to the nearest integer.Medium6GeometrySorting+2No attempts yet1s128 MBJudgeable
The Dog TaskBob walks a polygonal path through N points; Ralph may leave each segment to visit at most one interesting place and never reuse a place. Maximize places visited.Medium6GeometryGraph+2No attempts yet1s128 MBJudgeable
Fool's DayFor each test case, decide whether a parallelogram postcard fits inside a parallelogram envelope, allowing rotation, translation, and flipping.Medium6GeometryImplementation+1No attempts yet2s64 MBJudgeable
Honey and Milk LandGiven spacings between parallel north-south rivers and between parallel east-west rivers, find the shortest helicopter route crossing every river at least once, rounded up.Medium6GeometryGreedy+2No attempts yet1s128 MBJudgeable
CrankshaftGiven polygons listed clockwise, compute the area-weighted centroid of all plates and print each coordinate as a reduced fraction.Medium6GeometryMath+2No attempts yet1s512 MBJudgeable
Angry LarvaEach snake is a vertical segment at some x-coordinate and height range. Find the launch angle whose parabola passes through the most segments.Medium6GeometryIntervals+1No attempts yet1s128 MBJudgeable
Forest FiresGiven a grid with plant cells, fire cells, and empty cells, compute when every burnable cell catches fire under Euclidean squared spark costs.Medium6GraphShortest path+2No attempts yet1s128 MBJudgeable
StarsGiven a star map of points with brightness and several constellation point sets, count how many rotated or scaled copies of each occur and report the brightest such occurrence.Medium6GeometryHash map+2No attempts yet1s128 MBJudgeable
Counting Lit PixelsFor each integer circle center and radius, count the unit grid squares the disk covers, ignoring squares touched only along an edge or corner.Medium6MathGeometry+2No attempts yet1s128 MBJudgeable
Earthquake EmendationsMatch each scattered polygon piece to its rotated location in the shattered window schematic.Medium6GeometryHash map+1No attempts yet1s128 MBJudgeable
Honed HopsGiven two sets of sampled points on a nonnegative quadratic jump arc, decide whether they necessarily come from the same parabola, cannot, or it is undecidable.Medium6MathGeometry+1No attempts yet1s128 MBJudgeable
Shortest Computer Reboot TourGiven up to 12 points, find the shortest closed tour that visits every point exactly once and returns to the start.Medium6Dynamic programmingBit manipulation+1No attempts yet0.1s128 MBJudgeable
Parabolic TeleportsGiven up to 100 parabolic arcs you can ride for free, find the minimum walking time from point V to point W.Medium6GeometryGraph+1No attempts yet2s128 MBJudgeable
Count SquaresGiven up to 2000 distinct integer points, count how many squares have all four vertices among them, including tilted squares.Medium6GeometryHash map+1No attempts yet1s128 MBJudgeable
Radio CoverageChoose a non-overlapping subset of at most 10 candidate disks inside a base disk to maximize the union area of the base and chosen disks.Medium6GeometryBrute force+1No attempts yet3s128 MBJudgeable
Falling CardsSimulate a row of non-intersecting standing cards: when a card falls it sweeps a rectangle of height H, knocking over any card it touches, and each touched card topples away from the pusher.Medium6GeometrySimulation+1No attempts yet1s128 MBJudgeable
TriangulationGiven a convex polygon, find the triangulation whose total diagonal length is minimum and report it rounded to two decimals.Medium6Dynamic programmingGeometryNo attempts yet1s128 MBJudgeable
Random WalkGiven a recorded sequence of moves on a square grid, decide whether he can walk back to the start without crossing his previous trail.Medium6GeometryImplementation+1No attempts yet1s128 MBJudgeable
RectanglesGiven up to 7000 axis-aligned integer rectangles, count connected components where rectangles merge if their overlap contains a segment of positive length.Medium6Union-findGeometry+2No attempts yet1s128 MBJudgeable
ExamGiven n equal-size axis-aligned rectangles dropped in order, report the indices of sheets whose interior no later sheet covers.Medium6GeometryIntervals+2No attempts yet5s128 MBJudgeable
ChessboardGiven up to 200,000 pieces on an m by m board, count for each piece how many empty squares it can capture in one move.Medium6SortingHash map+2No attempts yet1s128 MBJudgeable
Contour LinesGiven sets of axis-parallel polygons, decide whether each set can be ordered so every polygon lies inside the next.Medium6GeometrySorting+1No attempts yet1s128 MBJudgeable
EarthquakeCount the integer points (x,y) with x≥0, y≥0 and Ax+By≤C for given positive A, B, C.Medium6MathNumber theory+1No attempts yet1s128 MBJudgeable
Why Do They Sing?Decide whether a path from the bottom edge to the top edge of a rectangle avoids every given singing circle.Medium6Union-findGeometryNo attempts yet1s128 MBJudgeable
Stained GlassGiven N lines with fixed directions that may be shifted freely, arrange them to maximize the number of regions and output that maximum.Medium6Hash mapCombinatorics+2No attempts yet2s128 MBJudgeable
Hubble Space TelescopeFind the earliest time t between 0 and 100000 that minimizes the largest distance from the star alpha to the other moving stars.Medium6Binary searchGeometry+1No attempts yet1s128 MBJudgeable
Turtle GraphicsSimulate the direction-digit moves, erasing each loop or overlap as it forms, then report the remaining segment count and total length.Medium6SimulationStack+2No attempts yet1s128 MBJudgeable
Largest SquareGiven N points on a plane, find the area of the largest square with all four vertices among the points, or 0 when no square exists.Medium6GeometryHash map+1No attempts yet10s256 MBJudgeable
Shoe-printDecide whether two clockwise point sequences describe the same shape up to rotation and translation, without reflection.Medium6GeometryNo attempts yet1s128 MBJudgeable
Robert HoodGiven C points on a plane, compute the squared distance between the farthest pair of points.Medium6GeometrySorting+1No attempts yet1s256 MBJudgeable
Canyon CrossingDecide whether a path from the left edge to the right edge of a rectangle avoids up to 1000 circular craters.Medium6Union-findGeometryNo attempts yet1s128 MBJudgeable
Satellite PhotosCompute the union area of up to 1000 axis-aligned rectangles in each of up to 100 test cases.Medium6GeometrySegment tree+1No attempts yet2s256 MBJudgeable
Solar EclipsePlace a point as close to the origin as possible while staying at least 2R away from n given disk centers.Medium6GeometryBrute forceNo attempts yet1s128 MBJudgeable
MultikillChoose any blast point on the plane to cover as many given points as possible within radius R and print the best count for each group.Medium6GeometryBrute forceNo attempts yet2s128 MBJudgeable
Regions Cut by RectanglesCount the regions into which up to 50 axis-aligned rectangle borders divide the plane, including the outer unbounded region.Medium6GeometryGraph+1No attempts yet5s128 MBJudgeable
Swyper KeyboardExpand a swipe path over a four-row letter grid into every key each segment crosses, then print the first dictionary word that is a subsequence of it.Medium6GeometryString matching+1No attempts yet1s128 MBJudgeable
RectanglesCompute the total area covered by up to 1000 axis-aligned rectangles, counting overlaps once.Medium6SortingIntervals+1No attempts yet1s128 MBJudgeable
Get Out 'Da Way!Simulate up to ten bullets fired at a moving flat target and mark each hit block with an asterisk.Medium6GeometrySimulation+1No attempts yet1s128 MBJudgeable
MazeDecide whether a string of left and right turns can appear on a single walk around an axis-aligned polygon with right angles.Medium6GeometryMathNo attempts yet3s512 MBJudgeable
FirefliesChoose a shutter time that minimizes the side length of an axis-aligned square holding all fireflies moving at constant velocities.Medium6Binary searchGeometryNo attempts yet1s128 MBJudgeable
Cow OpticsCount empty integer points where one added 45-degree mirror steers the northbound laser from the origin to the barn through the existing mirrors.Medium6SimulationSorting+1No attempts yet1s128 MBJudgeable
Crane BalancingFind the range of extra weight at the first vertex that keeps the polygon balanced on the x-axis.Medium6GeometryMathNo attempts yet1s128 MBJudgeable
Big CircleGiven up to 100000 points on a single circle, find the smallest Euclidean distance between any two of them.Medium6GeometrySortingNo attempts yet1s16 MBJudgeable
Tinted Glass WindowN overlapping rectangles each add an integer tint to the area they cover, and you must find the total area whose summed tint is at least T.Medium6Prefix sumSorting+1No attempts yet1s256 MBJudgeable
Lazy FoxStarting from the origin, visit neighbors so each hop is strictly shorter than the last and collect the maximum number of treats.Medium6Dynamic programmingSorting+1No attempts yet1s256 MBJudgeable
Spectator SeatsPrint the number of seats on circles D1 to D2 with no other seat on the same ray from the center.Medium6Number theoryMath+1No attempts yet1s64 MBJudgeable
VampireA circular sun of radius r rises from the horizon behind rectangular buildings, and each dataset asks for the last time the whole disk stays hidden.Medium6GeometryIntervals+1No attempts yet3s256 MBJudgeable
Don't Cross the Circles!Decide whether two points can be joined by a curve that crosses none of up to 100 given circle circumferences.Medium6GraphGeometry+1No attempts yet1s256 MBJudgeable
How many squares?Count quadruples of the given infinite lines that form the four sides of a square.Medium6GeometryHash mapNo attempts yet1s256 MBJudgeable
Fortress ConstructionChoose up to four of the given points as corners of a convex polygon with maximum area.Medium6GeometryBrute forceNo attempts yet7s256 MBJudgeable
Aquarium TankA convex polygon tank of depth D holds L litres of water, and the task asks for the height of the water surface.Medium6GeometryBinary searchNo attempts yet1s256 MBJudgeable
Mosquito, You Are MineCover as many of up to 32 points as possible with one circle of the given diameter and report the maximum count.Medium6GeometryBrute forceNo attempts yet2s256 MBJudgeable
Multi-touch gesture classificationFrom two side-by-side touch images, extract finger blobs and centers, pair the touches, and report pan, zoom, or rotation with its direction.Medium6SimulationGeometry+1No attempts yet2s256 MBJudgeable
Finding a LineDecide whether any single line passes through at least p percent of N given points.Medium6ProbabilityGeometry+1No attempts yet4s256 MBJudgeable
Holstein FenceEnclose the most Holsteins in an axis-aligned rectangle with no Guernsey inside, breaking ties by smallest area.Medium6Brute forceSorting+1No attempts yet1s256 MBJudgeable
Picky EaterCut the convex polygon along one diagonal between nonadjacent vertices and eat the largest piece that contains no olive.Medium6GeometryBrute force+1No attempts yet1s512 MBJudgeable
Cutting CheeseCut a 100 mm cube with spherical holes into s slices of equal cheese volume perpendicular to the z axis and print each thickness.Medium6Binary searchGeometry+1No attempts yet3s256 MBJudgeable
Window ManagerSimulate a phone window manager that opens, closes, resizes, and moves non-overlapping rectangles with cascading pushes and reports errors.Medium6SimulationGeometryNo attempts yet2s256 MBJudgeable
SnakeA snake that never shrinks grows one cell per second on a square board and turns on schedule; report when it leaves the board or bites its own body.Medium6GeometrySimulationNo attempts yet1s256 MBJudgeable
Contest Pizza CuttingFind the largest number of equal radial slices of a circle that each contain the same number of given points with no cut passing through a point.Medium6GeometryBrute force+1No attempts yet1s256 MBJudgeable
Undetected RouteFind how many leading sensors can stay active before their overlapping circles join the left and right walls and block travel from the bottom edge to the top.Medium6Union-findBinary search+2No attempts yet2s256 MBJudgeable
Forest HighwayCompute the area of the part of a simple polygon lying at distance at least d from a given infinite line.Medium6GeometryNo attempts yet1s256 MBJudgeable
TomosynthesisGiven N disjoint disks, find the widest angle range over which their parallel projections stay pairwise disjoint.Medium6GeometryIntervals+1No attempts yet1s256 MBJudgeable
Above or Below the Koch CurveGiven a level L Koch curve from (0,0) to (1,0), decide whether each query point lies above or below the curve.Medium6RecursionGeometry+1No attempts yet1s256 MBJudgeable
Colby's Costly CollectiblesCount the unit triangles inside a simple polygon traced by axis moves on a triangular grid.Medium6GeometryMathNo attempts yet1s256 MBJudgeable
The AgglomeratorSimulate moving circular droplets that merge on contact with area-weighted position and velocity, and report the final count and last merge time.Medium6SimulationMath+1No attempts yet3s256 MBJudgeable
Vegetables left outside the fenceSum the indices of up to 100000 points that lie outside a given axis-aligned simple polygon with up to 100000 vertices.Medium6GeometrySortingNo attempts yet3s256 MBJudgeable
Probability ExperimentCount the triples of given points on a circle that form an acute triangle.Medium6Two pointersCombinatorics+1No attempts yet1s256 MBJudgeable
Hilbert SortSort up to 200,000 labeled grid points by the order in which the Hilbert curve visits them.Medium6RecursionSorting+1No attempts yet5s256 MBJudgeable
Hovering HornetExpected number of spots on a die visible from a random point in its box, counting a spot only when the segment to the viewer misses the die.Medium6GeometryProbability+1No attempts yet1s512 MBJudgeable
MuseumCount triples of wall pillars that form a triangle none of whose sides crosses the square pedestal.Medium6GeometryCombinatorics+1No attempts yet2s256 MBJudgeable
Pipe cleaningDecide whether a subset of pipes covers every pipe crossing with exactly one of the two crossing pipes chosen.Medium6GraphBFS+1No attempts yet7s256 MBJudgeable
Saint John FestivalCount how many small lantern points fall inside or on the boundary of the convex hull of the large lantern points.Medium6GeometrySorting+1No attempts yet1s256 MBJudgeable
Squeeze the CylindersGiven up to 500 ground-resting cylinders with fixed order, compute the minimum wall-to-wall width when squeezed together.Medium6Dynamic programmingGeometryNo attempts yet1s256 MBJudgeable
Wall ClocksEach member sees a section of the office walls inside a 90 degree cone, and the task asks for the fewest clock points so every member sees at least one.Medium6GreedyIntervals+1No attempts yet1s256 MBJudgeable
Field ReductionRemove up to three of N points so the axis-aligned bounding rectangle of the rest has the smallest possible area.Medium6Brute forceGeometryNo attempts yet2s512 MBJudgeable
Splitting the FieldCompute how much fenced area is saved by covering all points with two disjoint axis-aligned rectangles instead of one.Medium6SortingPrefix sum+1No attempts yet2s512 MBJudgeable
Filling a Board with N-OminoesFor each case with piece size X and board R by C, decide whether Richard has an X-omino that blocks every tiling or Gabriel tiles the board anyway.Medium6Game theoryGeometry+1No attempts yet5s512 MBJudgeable
X Marks the SpotFind the shortest integer direction so two movable perpendicular lines split the 4N points into four groups of N each.Medium6GeometrySorting+1No attempts yet5s512 MBJudgeable