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 results2,730 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| Crazy RotationsGiven a row of coloured lights, find the smallest rotation amount that can appear at position p in a non-decreasing sequence of rotation craziness values. | Hard9 | String matchingCombinatorics+2 | No attempts yet | 15s | 512 MB | Judgeable |
| GCD SumFor each k from 1 to n, split a multiset of n numbers into k nonempty groups to maximize the sum of the groups' gcds. n is up to 500000 and each value up to 10^12. | Hard9 | Number theoryGreedy+2 | No attempts yet | 2s | 1024 MB | Judgeable |
| Lunar LandscapeCompute the total area covered by axis-aligned squares and 45-degree rotated squares, counting overlaps once. | Hard9 | GeometrySorting+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Journey from Petersburg to MoscowFind the minimum cost path from city 1 to city n where only the k most expensive edges of the path are paid for, or all edges if the path has k or fewer. | Hard9 | GraphShortest path+2 | No attempts yet | 3s | 512 MB | Judgeable |
| Laminar FamilyGiven an undirected tree and f vertex sets, each a simple path, decide whether the family of paths is laminar. | Hard9 | TreeDFS+2 | No attempts yet | 2s | 512 MB | Judgeable |
| GardenerMaintain N gardens under plantings, range deletions of plants taller than h, and range count queries, all with time-dependent growth. | Hard9 | Segment treeBinary search+2 | No attempts yet | 3s | 128 MB | Judgeable |
| In honor of Taekhee's graduationDeer bounce on a line segment [0,T], each with strength; a statue at x falls when the net force of deer that have reached it exceeds W. Maximize the fall time over x. | Hard9 | MathSimulation+2 | No attempts yet | 3s | 128 MB | Judgeable |
| New HomeStores of k types each occupy a point and an open year interval; for each (location, year) query, report the maximum over types of the distance to the nearest open store of that type, or -1 if some type is missing. | Hard9 | Segment treeBinary search+2 | No attempts yet | 5s | 1024 MB | Judgeable |
| Circle SelectionProcess circles in decreasing radius order; each chosen circle removes all remaining circles that intersect it, and for every circle you must report which chosen circle eliminated it. | Hard9 | GeometrySorting+2 | No attempts yet | 3s | 1024 MB | Judgeable |
| 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. | Hard9 | GraphBFS+2 | No attempts yet | 5s | 768 MB | Judgeable |
| Cloud computingChoose a set of orders and a set of computers to buy so every accepted order gets enough cores at its minimum clock rate, maximizing payments minus computer costs. | Hard9 | Dynamic programmingGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Hard9 | MathGeometry+2 | No attempts yet | 1.5s | 512 MB | Judgeable |
| Monitoring Ski PathsA DAG has at most one outgoing edge per junction and unique landing points; pick the fewest junctions met by all m registered s-to-t to-basement paths. | Hard9 | GraphGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Hard9 | GreedyGeometry+2 | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Hard9 | Dynamic programmingSorting+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Query and QueryEach query swaps two sequence values; after every swap, pair up the M left-pocket indices and M right-pocket indices to minimize the largest range maximum. Output that minimized maximum. | Hard9 | Segment treeGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Hard9 | GeometryDynamic programming+2 | No attempts yet | 1s | 512 MB | Judgeable |
| EmploymentGiven candidate evaluation values with point updates, answer queries asking for the number of maximal contiguous blocks of hired candidates whose value is at least a threshold. | Hard9 | Segment treeDivide and conquer+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Historical ResearchFor each query range, report the maximum over event types t of t times the count of t inside the range. | Hard9 | Divide and conquerArray+2 | No attempts yet | 4s | 512 MB | Judgeable |
| 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. | Hard9 | Minimum spanning treeGeometry+2 | No attempts yet | 5s | 256 MB | Judgeable |
| Sequence and Queries 34Maintain two integer sequences under updates and range queries: for a suffix of a compute the longest match against b and how many suffixes achieve it, compare suffixes of b, and test whether a concatenation of two b-substrings is itself a substring of b. | Hard9 | String matchingSegment tree+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Nearest PointsCount the integer lattice points in an axis-aligned rectangle whose Euclidean distance to p1 is the minimum among K marked points. | Hard9 | GeometryDivide and conquer+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Help Yourself (Platinum)Sum the K-th power of the number of connected components of the union over all 2^N subsets of N intervals, modulo 1e9+7. | Hard9 | CombinatoricsDynamic programming+2 | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Hard9 | GeometrySorting+2 | No attempts yet | 2s | 256 MB | Judgeable |
| Good GameCount monotone lattice paths in n dimensions from the origin to a target, avoiding m forbidden points, modulo 1e9+7. | Hard9 | CombinatoricsDynamic programming+2 | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Hard9 | GeometryCombinatorics+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Jong Hyok and StringGiven n pattern strings, for each query string Q count the substrings T of the patterns with the same set of (pattern, end position) occurrence pairs as Q. | Hard9 | StringTrie+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| JumpGiven cities at integer grid points and portals that jump from one city to any city inside an axis-aligned rectangle at a given cost, find the shortest time from city 1 to every city. | Hard9 | Shortest pathGraph+2 | No attempts yet | 1s | 512 MB | Judgeable |
| The Potion of Great PowerGiven a graph whose edges change once per day with degree at most D, answer queries online for the minimum altitude difference between a neighbor of x and a neighbor of y on a given day. | Hard9 | GraphSorting+2 | No attempts yet | 3s | 256 MB | Judgeable |
| Find Marble Positions and VelocitiesReconstruct each marble's starting x-coordinate and constant velocity from N+1 unordered snapshots of N linearly moving marbles. | Hard10 | MathCombinatorics+2 | No attempts yet | 2s | 128 MB | Judgeable |