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
Voronoi DiagramGiven a connected weighted graph and a set of source vertices, assign every point on every edge to its nearest source (smallest index on ties) and report the total length each source owns.Hard9GraphShortest path+2No attempts yet2s1024 MBJudgeable
The SprawlOn an infinite grid, N cities grow one cell per day in index order; sum over all pairs the first day the two cities' territories touch and connect.Hard9GraphBFS+2No attempts yet5s768 MBJudgeable
BoosterFor each query, decide whether the character can travel from checkpoint A to checkpoint B with maximum HP X, given walking drains HP and the booster moves only along axes.Hard9GraphUnion-find+2No attempts yet8s512 MBJudgeable
ConstellationChoose a subset of up to 2e5 points maximizing total brightness so that from any chosen point all others fall in the first or third quadrant, with the nearest point in each occupied quadrant within Chebyshev distance L.Hard9MathGeometry+2No attempts yet1.5s512 MBJudgeable
SatellitesSatellites appear and disappear above a half-disc planet; for each query decide whether two satellites have a common coverage point outside the planet that no other live satellite covers.Hard9GeometryDynamic programming+2No attempts yet4s512 MBJudgeable
Removing Magical TilesGiven trapezoid tiles above the x-axis, find the minimum number of groups where each group is a set of tiles that pairwise overlap.Hard9GreedyGeometry+2No attempts yet2s512 MBJudgeable
Magic TrianglesGiven up to 100000 counter-clockwise triangles, compute the area of their common intersection.Hard9GeometryDivide and conquer+2No attempts yet2s512 MBJudgeable
Mowing MischiefGiven flowers on a grid, pick a longest chain of flowers both paths must visit, then find the minimum area the two monotone paths can sweep.Hard9Dynamic programmingSorting+2No attempts yet2s512 MBJudgeable
The Tallest and Widest CastleChoose which signposts serve as vertices of each floor so the castle has the most floors, then the largest total floor area, then the fewest signposts used, and report each signpost's floor number.Hard9GeometryDynamic programming+2No attempts yet1s512 MBJudgeable
Construction ProjectPlace at most H airports among N towns and connect all towns with axis-parallel roads that avoid M rectangular obstacles, minimizing airport cost times count plus total road length.Hard9Minimum spanning treeGeometry+2No attempts yet5s256 MBJudgeable
ConstellationCount the ways to assign each unlabeled point to constellation A or B so that the two vertex sets can be drawn connected with mutually non-crossing segments.Hard9GeometryCombinatorics+2No attempts yet1s512 MBJudgeable
Nearest PointsCount the integer lattice points in an axis-aligned rectangle whose Euclidean distance to p1 is the minimum among K marked points.Hard9GeometryDivide and conquer+2No attempts yet2s512 MBJudgeable
IneqGiven a finite set S of integer lattice points, decide whether S can be cut out as exactly the integer points lying strictly below every line of some finite family of half-planes.Hard9GeometryMath+2No attempts yet2s512 MBJudgeable
Unseen SegmentsGiven n vertical segments and queries of (west power, east power), find the total length of parts no observer sees through at most that many segments.Hard9GeometrySorting+2No attempts yet2s256 MBJudgeable
Random PointsGiven n points in general position, output 2^n times the expected number of vertices of the convex hull of a uniformly random subset, modulo 1e9+7.Hard9GeometryCombinatorics+2No attempts yet5s512 MBJudgeable
Coalescing ContinentsGiven K rectangles with total area 25 on a 20x20 grid, decide if they can be translated to tile a square, and find the minimum total moves.Hard10Brute forceMath+2No attempts yet1s128 MBJudgeable
CubesCount the orbits of general-purpose chip placements on cube faces under face rotations and cube rearrangement, given a fixed pattern of encoding chips.Hard10CombinatoricsMath+2No attempts yet1s128 MBJudgeable