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
SpaceCount, for each test case, the pairs of up to 100000 points whose Euclidean distance is strictly less than d.Medium5Hash mapGeometryNo attempts yet1s128 MBJudgeable
FishnetThreads join opposite sides of a unit square, and the program reports the largest cell area in the net they form.Medium5GeometryMathNo attempts yet1s128 MBJudgeable
BeehivesThe program decides whether two move records describe the same hexagonal layout under rotation and reversed reading, with mirror images treated as different.Medium5GeometryString matching+1No attempts yet1s128 MBJudgeable
Flower VasesGiven two pairs of pentominoes, decide whether each pair can be joined edge to edge into the same ten-square outline.Medium5Brute forceGeometryNo attempts yet6s128 MBJudgeable
Property LinesGiven up to 100 claimed rectangles inside a W by H city, compute the area claimed twice or more, at least once, and never.Medium5GeometryBrute force+1No attempts yet1s128 MBJudgeable
Cut the CakeCount into how many regions the given infinite lines divide a circle.Medium5GeometryCombinatoricsNo attempts yet20s128 MBJudgeable
ArcheryA ray from the origin fires in a uniform random direction, and the task asks the expected number of segments it pierces.Medium5GeometryProbabilityNo attempts yet1s128 MBJudgeable
Find the MarblesGiven up to 99 distinct integer points per test case, report the largest number of points that lie on one straight line.Medium5GeometryHash mapNo attempts yet1s128 MBJudgeable
Incomparable rectangle pairsCount the pairs of rectangles where neither fits inside the other after translation or a 90-degree rotation.Medium5SortingGeometry+1No attempts yet2s512 MBJudgeable
KansasTrack the clock-bearing driving segments and rest breaks to count breaks before the path first crosses the start, or report -1.Medium5GeometrySimulation+1No attempts yet2s1024 MBJudgeable
All SquaresGiven starting size k, count the nested corner squares whose border or interior holds the query point.Medium5RecursionGeometryNo attempts yet1s128 MBJudgeable
Heracles and the Stables of AugeasPick rivers whose water totals at least W so the sum of straight-line digging distances from the stable is smallest.Medium5Dynamic programmingGeometryNo attempts yet1s256 MBJudgeable
Hexagonal colonyChoose hexagonal cell blocks so the exposed wall windows house at least P people with the fewest blocks.Medium5GreedyGeometry+2No attempts yet1s256 MBJudgeable
Fence the vegetablesGiven up to 100000 plant points, compute the perimeter and area of the smallest axis-aligned integer-corner fence that keeps each side 1 mm from every plant.Medium5GeometryMathNo attempts yet3s256 MBJudgeable
Ring RingDecide if a dog crossing a road on a timed start collides with any of ten moving bicycle segments and report the gap used or the first hit.Medium5GeometryMath+1No attempts yet2s256 MBJudgeable
Texas SummersFind the route from the dormitory to class through shady spots that minimizes the sum of squared leg lengths, with ties broken by lexicographic index order.Medium5Shortest pathGraph+1No attempts yet2s256 MBJudgeable
Cake Corner TrimmingChoose the largest corner-trim parameter s so the convex polygon keeps at most fraction a of its area.Medium5GeometryMath+1No attempts yet1s256 MBJudgeable
Museum wall constructionFind the shortest closed curve enclosing N disjoint equal circles of radius R.Medium5GeometrySortingNo attempts yet1s256 MBJudgeable
The HunterFind the shortest rope between two points outside a circle that never enters it, straight when clear and two tangents joined by an arc otherwise.Medium5GeometryMathNo attempts yet1s128 MBJudgeable
Mobile GamingTwo rectangles move at constant speed from time 0 to 1; report the first moment they touch or overlap, or report no collision.Medium5GeometryIntervals+1No attempts yet1s256 MBJudgeable
Goblin Garden GuardsCount how many of up to 100000 points remain uncovered by 20000 sprinkler circles of radius at most 100.Medium5GeometryHash mapNo attempts yet3s256 MBJudgeable
Delicious CookieSplit every piece of a right triangle with legs a and b N times along the altitude to the hypotenuse and print the natural log of the K-th largest piece area.Medium5CombinatoricsGeometry+1No attempts yet1s512 MBJudgeable
Cheating KnightA knight whose jumps of fixed length may land on any point of the plane must reach a target square in the fewest jumps.Medium5GeometryMathNo attempts yet1s256 MBJudgeable
From Sinchon to AnamFind the shortest single segment that connects the Sinchon road network to the Anam road network.Medium5GeometryBrute forceNo attempts yet7s256 MBJudgeable
The Ant RobotGiven the side lengths of a rectangular box, compute the squared length of the shortest surface path between opposite corners.Medium5GeometryMathNo attempts yet1s256 MBJudgeable
Field ReductionYou remove one of N points to minimize the axis-aligned bounding box area of the rest.Medium5Brute forceGeometryNo attempts yet2s512 MBJudgeable
Filling a board with N-ominoes (Small)Given polyomino size X and board size R by C, decide whether the first player can choose a shape that makes the board impossible to tile.Medium5GeometryGame theory+1No attempts yet5s512 MBJudgeable
Rural Planning (Small)Order all given points into a simple polygon whose area exceeds half the largest achievable area and print the lexicographically smallest such order.Medium5Brute forceGeometryNo attempts yet5s512 MBJudgeable
Rural PlanningArrange every post into a simple polygon larger than half the convex hull area by building the two specified hull-chain orders and keeping the larger one.Medium5GeometrySorting+1No attempts yet5s512 MBJudgeable
Zombie Smash (Small)Plan a route from (0, 0) that smashes the most zombies, each catchable for 1000 ms after it appears, with 8-direction moves and a 750 ms smasher recharge.Medium5Brute forceIntervals+1No attempts yet5s512 MBJudgeable
Irregular Cakes (Small)Split the region between two polylines into G equal areas with vertical cuts and print each cut position.Medium5Binary searchGeometryNo attempts yet5s512 MBJudgeable
Irregular Cakes (Large Input)Find the vertical cut positions that split the region between two polylines into G slices of equal area.Medium5GeometryBinary search+1No attempts yet5s512 MBJudgeable
Lights (Small Input)For one pillar at most, compute the areas lit by red only, green only, both, and neither within a 100 by 100 square.Medium5GeometryImplementationNo attempts yet5s512 MBJudgeable
Juice (Small Input)Given up to 10 guests with minimum fractions of three juices summing to 1, find the largest subset satisfiable by one mix.Medium5Brute forceGeometry+1No attempts yet5s512 MBJudgeable
Scaled Triangle (Small)Given a triangle and its rotated, translated, and shrunk copy with matching corners, find the unique fixed point of the similarity transformation.Medium5GeometryMath+1No attempts yet5s512 MBJudgeable
BeehiveGiven two cell indices in an infinite hexagonal beehive numbered by distance from cell 1, find the grid distance between those cells.Medium5MathGeometry+1No attempts yet2s512 MBJudgeable
Torres del PaineFor each test case, compute the area inside a rectangle from which three given points are seen in a fixed clockwise order.Medium5GeometryMathNo attempts yet1s256 MBJudgeable
Manta RayFor each data set, count the plankton points that fall inside the rectangle swept by a mouth of width w moving distance t in direction alpha.Medium5GeometryMath+2No attempts yet2s512 MBJudgeable
Make One SquareGiven three rectangles that can each be rotated 90 degrees, decide whether they can tile one square exactly with no overlaps or gaps.Medium5GeometryImplementation+2No attempts yet2s512 MBJudgeable
Two-Wheel BuggySimulate a two-wheeled buggy through N timed wheel-speed instructions and print the final axle position to five decimals.Medium5GeometrySimulation+1No attempts yet8s512 MBJudgeable
Autocorrelation FunctionA piecewise linear function is given by its endpoints; compute the integral of f(x)f(x+r) over the whole line for a given shift r.Medium5MathGeometry+2No attempts yet8s512 MBJudgeable
Smoothed GardensGiven a triangle and a rope loop longer than its perimeter, find the area traced by a stake held tight in the loop.Medium5GeometryMathNo attempts yet2s512 MBJudgeable
Within Arm's ReachGiven segment lengths of a planar robotic arm and a target point, find where the tip lands when bent as close to the target as possible.Medium5GeometryMath+1No attempts yet2s512 MBJudgeable
Base StationsAmong points with different frequency labels, find the farthest pair and print the squared distance.Medium5GeometryBrute force+1No attempts yet2s512 MBJudgeable
Convenience Store 2Given n customer points, place one store anywhere to minimize the total Manhattan distance to all customers and print that minimum sum.Medium5MathSorting+2No attempts yet2s512 MBJudgeable
SprinklersPlace two fixed sprinklers and choose radii so every flower is covered, minimizing the sum of squared radii; print that minimum as an integer.Medium5SortingGreedy+2No attempts yet2s512 MBJudgeable
Flight PlanFor each pair of latitude/longitude points on a sphere, compute the great-circle distance and the distance of the two-leg path that keeps latitude then longitude constant.Medium5GeometryMath+2No attempts yet2s512 MBJudgeable
Line Friends (Small)Given N line segments, build a graph where segments are adjacent when they overlap, then answer shortest-path queries between pairs of segments.Medium5GraphBFS+2No attempts yet2s256 MBJudgeable
Amsterdam DistanceIn a half-disc street grid with M radial streets and N circular canals of radius R*y/N, find the shortest path length between two corners using only those streets and canals.Medium5GeometryGraph+1No attempts yet2s512 MBJudgeable
Birthday CakeGiven up to 50 candle points and up to 15 cuts, decide whether the cuts carve the cake so that every resulting piece holds exactly one candle.Medium5GeometryBit manipulation+2No attempts yet2s512 MBJudgeable
Imperfect GPSGiven a running path and a recording interval t, compute the percentage of the real distance the GPS receiver loses by sampling positions at fixed times and joining them with straight lines.Medium5GeometrySimulation+2No attempts yet2s512 MBJudgeable
Signal 1Choose a subset of points with distinct x-coordinates; maximize the total Euclidean length of the polyline joining them in increasing x order.Medium5Dynamic programmingSorting+2No attempts yet1.5s128 MBJudgeable
Glyph RecognitionFor each k from 3 to 8, fit the largest origin-centered regular k-gon with a vertex on the +x axis avoiding all points and the smallest one containing all points, then report the k with the best area ratio.Medium5GeometryBinary search+2No attempts yet2s512 MBJudgeable
*Light*Young*Woo*Given N lights that each illuminate a 90-degree upward sector, count for each query point how many sectors contain it.Medium5GeometryPrefix sum+2No attempts yet1s512 MBJudgeable
Gahui the Grappler!!Given a piecewise linear function through points (i, y_i) with y_0=0, decide whether the ray y=kx meets it anywhere besides the origin.Medium5GeometryMath+2No attempts yet2s512 MBJudgeable
Meet at One Point!Given triangle side lengths and two cevian foot offsets along two sides, find the third offset using Ceva's theorem for the concurrent cevians.Medium5GeometryMathNo attempts yet1s512 MBJudgeable
Lipschitz ConstantGiven N points (x, f(x)), the Lipschitz constant is the maximum slope between adjacent points after sorting by x.Medium5GeometrySorting+1No attempts yet2s512 MBJudgeable
Building a FieldGiven N points on a circle with arc lengths between consecutive points, decide whether four trees are the vertices of some rectangle.Medium5Hash mapGeometry+2No attempts yet2s512 MBJudgeable
Surface Area of CubesGiven an A x B x C block of unit cubes with N cubes removed (including interior ones), compute the total surface area including surfaces of interior cavities.Medium5Hash mapMath+2No attempts yet5s512 MBJudgeable
Two StickersGiven an H by W grid and N rectangles that may rotate, place two non-overlapping rectangles inside and maximize their total area.Medium5ImplementationBrute force+2No attempts yet2s512 MBJudgeable
Mountain ViewCount how many mountain peaks are not covered by any other 45-degree right-triangle mountain with its base on the x-axis.Medium5GeometrySorting+2No attempts yet2s512 MBJudgeable
Fence PlanningConnect cows into groups given moo pairs, then find the axis-aligned rectangle of smallest perimeter that fully contains one group.Medium5Union-findGraph+2No attempts yet2s512 MBJudgeable
HeightsGiven the three heights of a triangle, compute its area within an absolute error of 1e-5.Medium5MathGeometry+2No attempts yet1s256 MBJudgeable
Segment Intersection 1Given the integer endpoints of two segments, decide whether the segments intersect, using orientation tests with no three input points collinear.Medium5GeometryMath+2No attempts yet0.25s512 MBJudgeable
Retribution!Assign tar repositories and feather storehouses to judges one at a time by repeatedly taking the closest remaining pair, breaking ties by lowest index, and report the total distance.Medium5GreedyImplementation+2No attempts yet2s512 MBJudgeable
The Biggest TriangleGiven up to 100 lines, find the maximum perimeter of a triangle formed by any three of them, or report that no triangle exists.Medium5GeometryBrute force+2No attempts yet3s512 MBJudgeable
Move & MeetTwo pieces start at given grid cells and each must make exactly d orthogonal steps; decide whether some cell can be the common endpoint, and print one.Medium5MathImplementation+2No attempts yet2s512 MBJudgeable
Everything Has ChangedGiven a disc and several non-overlapping circles that cut holes in it, compute the perimeter of what remains, counting only arcs on the disc's boundary.Medium5GeometryMath+2No attempts yet1s512 MBJudgeable
EuclidGiven three points in 3D space, find a point minimizing the sum of Euclidean distances to all three.Medium5GeometryMath+2No attempts yet1s512 MBJudgeable
Catching MiceGiven moving mice with initial positions and velocities, find the largest square cage side length for which no drop time can enclose all mice simultaneously.Medium6GeometryBinary search+1No attempts yet2s128 MBJudgeable
Painting 1Compute the unpainted area of a paper after one vertical fold and c horizontal accordion folds, then painting a rectangle and unfolding.Medium6GeometryMath+2No attempts yet2s128 MBJudgeable
FencesPartition up to 16 given fence lengths into disjoint triples, keep only triples that form a valid triangle, and maximize the total area.Medium6Dynamic programmingBit manipulation+2No attempts yet2s128 MBJudgeable
PizzaCount lines through the origin that reflect a set of pizza toppings onto themselves, printing -1 if infinitely many such lines exist.Medium6GeometryBrute force+2No attempts yet2s128 MBJudgeable
Installing Power Plant CablesFind the minimum total length of new cables needed to connect plant 1 to plant N, using free existing cables and new links capped at length M, via shortest path.Medium6Shortest pathGraph+1No attempts yet2s128 MBJudgeable
Cutting a Cake with a HoleGiven a square cake with a smaller square hole in its center, count how many pieces result from horizontal and vertical full-line cuts that only affect actual cake material.Medium6GeometryUnion-find+2No attempts yet1s128 MBJudgeable
Smallest RectangleFind the minimum area axis-aligned rectangle with integer coordinates whose strict interior contains at least half of N given points.Medium6GeometryBrute force+2No attempts yet2s128 MBJudgeable
Covering Points with a SquareGiven up to 50 points, decide whether an axis-aligned square's four sides can cover every point and output its side length, or -1 if no such square exists.Medium6GeometryMath+2No attempts yet2s128 MBJudgeable
Planning the InfiltrationConvert offset hex coordinates to axial form and compute the spiral ring index used by a monkey's numbering scheme.Medium6MathGeometry+1No attempts yet2s128 MBJudgeable
Circle on TilesGiven an even N, count how many unit tiles of an N by N grid are crossed by the circle inscribed tangent to all four sides.Medium6GeometryMath+1No attempts yet5s128 MBJudgeable
Border-Crossing SalesmanGiven a convex polyhedron whose faces are countries, build the face-adjacency graph from shared edges and answer BFS shortest-path queries between faces.Medium6GeometryGraph+2No attempts yet2s128 MBJudgeable
RectanglesFind a line through the origin that intersects the maximum number of given axis-aligned rectangles, using each rectangle's angular interval from the origin.Medium6IntervalsSorting+1No attempts yet2s128 MBJudgeable
Map LabelsGiven city points, find the maximum label height so that fixed-ratio (3:1) rectangles anchored at each point never overlap, using binary search on the height with an efficient feasibility check.Medium6Binary searchSorting+1No attempts yet2s128 MBJudgeable
RaceGiven n checkpoints with scores that must be visited in increasing index order from and back to the origin, find the maximum score achievable within a runner's distance budget, for multiple runners.Medium6Dynamic programmingGeometry+1No attempts yet1s128 MBJudgeable
Line DrawingGiven up to 10,000 line segments, count connected groups formed by segments that touch, overlap, or intersect, using geometric intersection tests combined with union-find.Medium6Union-findGeometryNo attempts yet2s128 MBJudgeable
Crossed LaddersGiven two crossed ladder lengths and the crossing height above ground, compute the width of the alley between the buildings using binary search or numeric root finding.Medium6Binary searchMath+1No attempts yet2s128 MBJudgeable
Farthest Pair of PointsGiven up to 100,000 planar points, find the maximum squared Euclidean distance between any two points, typically via convex hull and rotating calipers.Medium6GeometryDivide and conquer+1No attempts yet1s128 MBJudgeable
Restore an Orthogonal PolygonGiven the unordered vertices of an orthogonal (axis-aligned) polygon, reconstruct the boundary order and output its perimeter length.Medium6GeometrySorting+1No attempts yet2s128 MBJudgeable
Line Segment GroupsGiven N line segments, group them by connectivity (segments that touch or cross belong together) and output the number of groups and the size of the largest group.Medium6Union-findGeometry+1No attempts yet2s128 MBJudgeable
Walking the DogCompute total signed angle swept around the origin as a sequence of points connects via shortest arcs, then floor the number of full rotations.Medium6GeometryMath+1No attempts yet2s128 MBJudgeable
Minkowski SumGiven two convex polygons up to 1000 vertices, compute their Minkowski sum polygon printed in counterclockwise order starting from a canonical vertex.Medium6GeometrySorting+1No attempts yet2s128 MBJudgeable
Mole CatchingGiven N moles with positions and appearance times, find the maximum number Jeongeun can catch by moving at speed at most S from origin at time 0.Medium6Dynamic programmingSorting+1No attempts yet2s128 MBJudgeable
Closest Pair of PointsGiven up to 100,000 points, compute the minimum squared distance between any two points efficiently.Medium6Divide and conquerSorting+1No attempts yet1s256 MBJudgeable
HoneycombGiven a hexagonal spiral numbering of honeycomb cells centered at 1, compute the minimum number of rooms on a shortest path from room 1 to room N.Medium6MathBinary search+1No attempts yet2s128 MBJudgeable
Base StationsGiven points off a line, place axis-aligned squares centered on the x-axis to cover all points while minimizing the total side length sum.Medium6Dynamic programmingSorting+2No attempts yet2s128 MBJudgeable
Wire CuttingGiven a closed wire path on a grid described by bend points, find the longest resulting segment after cutting it with a vertical line at a given position.Medium6GeometrySimulation+1No attempts yet1s128 MBJudgeable
Diamond ExcavationFind the center (with integer coordinates on the map) of an axis-aligned diamond shape of fixed diagonal length K that covers the maximum number of given points, using a rotated-coordinate transform and brute force over candidate centers.Medium6MathBrute force+1No attempts yet1s128 MBJudgeable
HelipadFind the point minimizing the maximum distance to a set of up to 1000 given points (minimum enclosing circle), and output its coordinates and radius.Medium6GeometryMath+1No attempts yet1s128 MBJudgeable
Simple RectangleGiven a robot's rectilinear path on a grid up to 100x100, find the smallest-area empty rectangle bounded purely by the drawn segments.Medium6GeometrySimulation+1No attempts yet1s128 MBJudgeable
Finding a Right Isosceles TriangleGiven a 10x10 binary grid, decide whether the filled cells exactly form one axis-aligned right isosceles triangle and output its three vertices or 0.Medium6GeometrySimulation+1No attempts yet1s128 MBJudgeable
Total Area of Several RectanglesGiven up to 30 axis-aligned rectangles, compute the total area of their union.Medium6GeometrySorting+1No attempts yet1s128 MBJudgeable