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
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| PotholesPlace a straight rope across a rectangular lot without crossing any pothole so the total pothole area is split as evenly as possible, with tie-breaking rules. | Hard9 | GeometrySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Congruent Partition of ChocolateGiven a connected polyomino of at most 36 unit squares, decide whether it splits into two connected pieces that are congruent under rotation, reflection, and translation. | Hard9 | Brute forceDFS+2 | No attempts yet | 30s | 128 MB | Judgeable |
| Twirl AroundA bar inside a simple polygon rotates clockwise, pivoting on the wall whenever a new contact point appears; report the final position of one end, or the position when it jams. | Hard9 | GeometrySimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Around the TrackFind the Eulerian circuit of a planar-ish graph whose total turning cost is minimized, where each degree-4 node requires choosing how to pair its incident edges. | Hard9 | GraphDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| ASCII ArtRender triangles with ASCII characters, projecting 3D vertices through a camera onto an S by S screen grid with depth-based visibility. | Hard9 | GeometryImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Two Circles in a Convex PolygonFind the largest radius R so that two non-overlapping circles of radius R fit inside a given convex polygon with N vertices. | Hard9 | GeometryBinary search+2 | No attempts yet | 4s | 128 MB | Judgeable |
| Giant CoverGiven axis-aligned boxes on a rectangular campus, find the minimum surface area of a convex solid above the ground that covers all boxes and is anchored to the campus boundary. | Hard9 | GeometryMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| TablesCount the tilings of a polyiamond on a triangular grid by isosceles trapezoids made of three unit triangles, given the shape's boundary as a sequence of grid nodes. | Hard9 | Dynamic programmingGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Farmer JohnGiven start, goal, and up to 100 disjoint line-segment fences, find the shortest path that cannot cross any fence, touching allowed, and print the length to six decimals. | Hard9 | GeometryGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Ballroom LightsGiven point lightbulbs and disjoint circular columns inside a rectangle, compute the total length of the wall perimeter that some lightbulb can reach with a straight, unblocked ray. | Hard9 | GeometryMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Not Too Convex HullPartition the nails into B convex polygonal groups, all sharing the origin nail, minimizing the total covered area, with the origin strictly inside the global hull. | Hard9 | Dynamic programmingGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The Ideal CityGiven N cells forming a simply connected polyomino with no holes, compute the sum of grid shortest-path distances over all pairs, modulo 1e9. | Hard9 | GraphBFS+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Tied DownGiven a closed polygonal rope loop and up to 10 collinear posts on its left, find the smallest set of posts to remove so the rope can be pulled free to the right. | Hard9 | GeometryGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Largest FenceGiven N grid points with no three collinear, find the size of the largest subset whose points form the vertices of a convex polygon. | Hard9 | GeometryDynamic programming+2 | No attempts yet | 2s | 128 MB | Judgeable |
| CastingFor a convex polygon, count the vertex pairs whose connecting line splits it into two parts that can each be pulled out by translation. | Hard9 | GeometryTwo pointers+2 | No attempts yet | 1s | 128 MB | Judgeable |
| PendulumSimulate an idealized pendulum swinging around point hooks on a wall and print the length of the periodic orbit it eventually settles into. | Hard9 | GeometrySimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The Herbalists' VillageGiven a friendship graph, decide whether it has a planar straight-line drawing where every vertex reaches infinity without crossing an edge. | Hard9 | GraphGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| LandingGiven up to 100000 integer points, find the largest circle whose boundary passes through at least three points and whose interior contains none, and output R^2 as a reduced fraction. | Hard9 | GeometryCombinatorics+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Move that Mouse AGAINGiven up to 50,000 axis-aligned rectangles in a fixed bottom-to-top stacking order, process 50,000 point clicks, printing the topmost window at each point and moving it to the top of the stack. | Hard9 | Segment treeGeometry+2 | No attempts yet | 3s | 128 MB | Judgeable |
| Fast FoodGiven up to 50 points in a 10 by 10 square, compute for each point the area of its Voronoi cell within the square and report the percentage, rounded to nearest with halves up. | Hard9 | GeometryDivide and conquer+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Joy of Mobile RoutingGiven grid building heights and antennas, find the shortest path from a start to a destination intersection where every visited intersection has line-of-sight to some antenna. | Hard9 | GraphShortest path+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Deformed WheelSimulate a convex polygon rolling down a piecewise-linear hill until it comes to rest, and print the final position of its center of gravity. | Hard9 | GeometrySimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Find the BorderGiven a closed self-intersecting polyline, count the vertices of the border of its interior, the outer boundary enclosing all bounded regions. | Hard9 | GeometryImplementation+2 | No attempts yet | 2s | 128 MB | Judgeable |
| IlluminationAssign N fixed angular directions to N sources so their wedges cover the plane and the sum of projections is minimized, tie-broken lexicographically. | Hard9 | GeometryCombinatorics+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Mirror TrapFor each box [-x,x]x[-y,y]x[-z,z], find the maximum Manhattan distance a laser at the origin can travel before returning to the origin, avoiding edges and vertices. | Hard9 | MathNumber theory+2 | No attempts yet | 3s | 512 MB | Judgeable |
| Dextrogyrate CamelFind the longest closed camel route that starts at oasis 1 heading to oasis 2, always turns right by at most 180 degrees at each oasis, never crosses itself, and visits the most distinct oases. | Hard9 | GeometryDynamic programming+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Save the DinosaursFor each vacant point, add it to the existing set and report the area protected by the soldiers (the region where every move gets closer to some soldier). | Hard9 | GeometrySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Ice rinkA skater slides in straight lines across a square rink with rectilinear obstacles, stopping only at walls, and must reach the finish point in the fewest slides. | Hard9 | BFSGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Axes of SymmetryFor each simple polygon, count its axes of symmetry; n can reach 100000, so the check must run in near-linear time. | Hard9 | String matchingGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Isles in a Triangular GridEnumerate all non-congruent triangular-grid isles of up to ten triangles, canonicalizing each by the lexicographically smallest clockwise boundary-turn word. | Hard9 | GeometryBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| IslandGiven a convex polygon with towns on its vertices, all diagonals and sides drawn, and some segments blocked, find the shortest path from vertex n to vertex 1 using roads and their crossings. | Hard9 | GraphShortest path+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Ski RentalGiven daily snowfall amounts with point updates, answer queries asking for the maximum average snowfall over a consecutive run starting at a given day, reported as an irreducible fraction. | Hard9 | Segment treeGeometry+1 | No attempts yet | 1s | 128 MB | Judgeable |
| SpiderA walk on an infinite regular seven-legged web is given as turn directions; count the web nodes strictly inside the closed polygon it traces. | Hard9 | GeometryImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Army TrainingGiven n points with no three collinear, answer m queries, each a simple clockwise polygon on those points, counting the points strictly inside it. | Hard9 | GeometryCombinatorics+2 | No attempts yet | 2s | 512 MB | Judgeable |
| DiamondGiven a convex polyhedron, choose one plane cut so that the two resulting pieces have the largest combined number of faces. | Hard9 | GeometryBrute force+1 | No attempts yet | 2s | 512 MB | Judgeable |
| FishesGroup recorded closed routes into the fewest fish, where two routes can follow on consecutive days if the start cells touch and every point is visible 24 hours earlier. | Hard9 | GraphGeometry+2 | No attempts yet | 2s | 512 MB | Judgeable |
| WatchmenCount, for each city gutter, how many Palace gutters a walker can reach while dodging rotating watchers' lines of sight. | Hard9 | GeometryGraph+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Land TaxChoose a non-empty contiguous row and column range that maximizes combined row and column payments weighted by heights and widths. | Hard9 | Divide and conquerGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Plot of LandGiven up to 3000 pine points and one million query rectangles, report the convex hull area of the points inside each rectangle. | Hard9 | GeometryDivide and conquer+1 | No attempts yet | 1s | 128 MB | Judgeable |
| CrystalSum the signed charges of all three-colored unit triangles in a hexagonal crystal filled row by row from a modular generator. | Hard9 | MathGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| RoofCompute the maximum height of the 45-degree straight-skeleton roof built over a rectilinear polygon. | Hard9 | Geometry | No attempts yet | 1s | 128 MB | Judgeable |
| Aquarium DrainageGiven an orthogonal aquarium floor with holes on its segments, compute the total drain time and the water left behind. | Hard9 | GeometrySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Möbius StripGiven m and n, compute the average graph distance over all ordered square pairs on the m by 2n Mobius grid. | Hard9 | MathCombinatorics+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Fence WatchPlace the fewest sensors on a convex polygon boundary so every boundary point forms an angle from alpha to 360 degrees minus alpha with some sensor pair. | Hard9 | GeometryGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| MineshaftRun a pipe of straight segments up a winding polygonal shaft so each segment touches the walls in at least two places and the number of bends is minimal. | Hard9 | GeometryGraph+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Anchored BalloonFind the greatest height a balloon tied to ground anchors by fixed-length ropes can reach while all ropes hold and none cross. | Hard9 | GeometryBinary search+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Lonely MountainGiven two orthogonal mountain silhouettes, decide whether any solid casts both and print the largest possible volume modulo 1000000007. | Hard9 | GeometryMath+2 | No attempts yet | 2s | 256 MB | Judgeable |
| Largest and Smallest TriangleGiven n points in the plane, compute the largest and smallest areas among all triangles formed by triples of the points. | Hard9 | GeometrySorting+1 | No attempts yet | 6s | 128 MB | Judgeable |
| Chain & Co.Decide whether axis-aligned square links split into two nonempty groups with every cross pair linked. | Hard9 | GeometryGraph+1 | No attempts yet | 10s | 128 MB | Judgeable |
| Green EnergyPlace towers of given heights on a polygonal terrain to maximize the total length lit by parallel sun rays blocked by terrain and other towers. | Hard9 | GeometryGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| GRADCities join the road network one by one with two roads each, and each query asks the shortest road distance between two cities. | Hard9 | Shortest pathGraph+2 | No attempts yet | 2s | 256 MB | Judgeable |
| OrbitPlace two opposite sensors on the radius-R circle so their brightest-star readings match, and print the pair with the smallest angle. | Hard9 | GeometryMath+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Bisecting the IslandSplit an axis-parallel simple polygon into two congruent pieces with one axis-parallel cut on integer coordinates, or report that none exists. | Hard9 | GeometryBrute force | No attempts yet | 1s | 256 MB | Judgeable |
| The Forest of FangornFind which border camps connect to the start by a path where no tree ever hides behind another tree. | Hard9 | GeometryGraph | No attempts yet | 3s | 64 MB | Judgeable |
| Solar LampsCompute each lamp turn-on time from its place in the power-on order and the count of already lit lamps shining on it. | Hard9 | GeometrySegment tree+1 | No attempts yet | 1s | 256 MB | Judgeable |
| ParkingDecide whether axis-aligned cars in a strip of height w can be slid without overlap or rotation from the start layout to the target layout. | Hard9 | GeometryGraph+2 | No attempts yet | 3s | 256 MB | Judgeable |
| MuseumA burglar picks guards to bribe to maximize the value of exhibits no remaining guard sees minus bribe costs under downward cone views. | Hard9 | GraphGeometry+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Watering the Bean PlantsPlace at most one disk of radius R and cover the uncovered parts of N segments with unit-length sticks at minimum total cost. | Hard9 | GeometryGreedy+1 | No attempts yet | 10s | 256 MB | Judgeable |
| Art GalleryFind the vertex sequence of the shortest interior path between two given vertices of a polygon lit from edge v0-v1. | Hard9 | GeometryShortest path | No attempts yet | 1s | 256 MB | Judgeable |
| Random signalsCompute the expected plane integral of the strongest covering signal when each of up to 20 stations draws an independent uniform power that activates its disks. | Hard9 | GeometryProbability+1 | No attempts yet | 12s | 256 MB | Judgeable |
| Development of Small Flying RobotsEach robot moves sideways for 1 energy and rises through a hole for 100, and all must meet on one hole-free cell of the top floor for the least total energy. | Hard9 | Shortest pathGraph+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Canyon MappingCover a simple polygon with k equal axis-aligned squares and print the smallest side length that covers it, rounded to two decimals. | Hard9 | GeometryBinary search+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Balancing LineFind the shortest closed curve avoiding square lamp footprints that encloses a nonempty lamp group holding half the total energy. | Hard9 | GeometryBrute force+1 | No attempts yet | 10s | 256 MB | Judgeable |
| KernelDecide whether a rectilinear polygon contains a beacon point that attracts every other point under greedy distance-decreasing motion. | Hard9 | Geometry | No attempts yet | 1s | 256 MB | Judgeable |
| Highways and CountiesFind the smallest road length limit so cities joined by shorter roads form a group whose populations hold a subset summing to a multiple of K. | Hard9 | Minimum spanning treeDynamic programming+2 | No attempts yet | 2s | 64 MB | Judgeable |
| Runner and SniperYou give your start position and the gun's start angle and turn rate, then compute the fastest run speed at which the rotating gun still catches you. | Hard9 | Game theoryGeometry+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Rotating Cutter BitsThe program counts interior lattice points of a polygonal workpiece that survive one full rotation against a second rotating polygonal cutter. | Hard9 | GeometrySimulation+1 | No attempts yet | 3s | 256 MB | Judgeable |
| Lights Out in the BarnStarting at an unknown vertex of a rectilinear barn, walk the walls to identify the position and reach the exit with the smallest worst-case extra distance. | Hard9 | Dynamic programmingGame theory+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Twirling Towards Freedom (Large)Each minute you stay put or rotate 90 degrees clockwise around a star, and must report the largest squared distance from the origin reachable in M minutes. | Hard9 | GeometryNumber theory+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Ninjutsu (Large)Pick a starting rope length so the counterclockwise swing catches as many targets as possible before settling into orbit. | Hard9 | GeometryDynamic programming+1 | No attempts yet | 60s | 512 MB | Judgeable |
| Watering Plants (Large)Given non-overlapping plant disks, find the smallest radius R so that two disks of radius R together cover every plant disk completely. | Hard9 | GeometryBinary search+2 | No attempts yet | 60s | 512 MB | Judgeable |
| Polygonal PuzzleGiven two simple polygons, translate and rotate them without reflection so their interiors stay disjoint and their shared boundary is as long as possible; print that maximum length. | Hard9 | GeometryBrute force+2 | No attempts yet | 20s | 512 MB | Judgeable |
| Road TimesGiven a unique shortest route for each ordered city pair, recorded delivery times constrain 30 to 60 km/h road speeds; for each query find the minimum and maximum travel time consistent with all records. | Hard9 | Shortest pathMath+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Spin DoctorGiven n points (a_i, b_i) labeled 1 or 0, choose a direction (S, T); with ties broken adversarially, minimize the span covering all label-1 points. | Hard9 | GeometrySorting+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Connect HighwaysGiven two planar connected networks, find the Red-Blue junction pair allowed to be joined by a segment, following a fixed angular tie-breaking rule. | Hard9 | GeometrySorting+2 | No attempts yet | 0.4s | 32 MB | Judgeable |
| Covering postersFor each new axis-aligned rectangle, compute the total area of the given union of rectangles that it covers. | Hard9 | Segment treePrefix sum+2 | No attempts yet | 2s | 1024 MB | Judgeable |
| Half-plane land grab 2Maintain a dynamic set of lines under insertions and deletions and answer maximum-at-x queries online. | Hard9 | Dynamic programmingDivide and conquer+2 | No attempts yet | 4s | 512 MB | Judgeable |
| New TrackConstruct a fixed alternating axis-parallel polyline through a formula that encodes exactly k crossings, using a zigzag permutation of y coordinates to place them. | Hard9 | ImplementationCombinatorics+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Flowey's LoveA soul starting at the origin moves at speed at most 1 inside a rectangle; N moving points travel along fixed lines, and you must find the maximum number of points the soul can touch. | Hard9 | GeometryDynamic programming+2 | No attempts yet | 1s | 512 MB | Judgeable |
| PostersCompute the visible area of each of N rectangles pasted in order on the plane, where later rectangles cover earlier ones. | Hard9 | GeometryDivide and conquer+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Laser SensorsGiven N blue points and 2N red points in general position, build the particular non-crossing perfect matching prescribed by the paper's recursive angular-sweep Solve/Attach procedure. | Hard9 | Divide and conquerGeometry+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Distant StarsEach star moves at constant integer velocity; for each day 0 to T find the maximum pairwise squared distance, and report the earliest day attaining the minimum of that maximum. | Hard9 | GeometryDivide and conquer+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Counting points inside a circleFor each of M circle queries, count how many of N fixed points lie inside or on the circle, printing the count per query. | Hard9 | GeometryDivide and conquer+2 | No attempts yet | 8s | 512 MB | Judgeable |
| Polygon Shrinking KitEach polygon vertex is replaced by the midpoint toward A or toward B; among all choices keeping the vertices in convex order, find the minimum possible area. | Hard9 | GeometryDynamic programming+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Appropriate Coordinate MapGiven N points, choose a ring through all of them and endpoints A, B so the two legs are monotone in the projection onto AB, maximizing the smallest gap in that projection. | Hard9 | GeometryGreedy+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Jumping ImpalaGiven a lake, a central island, and S unit rocks, find the minimum leap distance letting Vlad reach the island and return twice without landing on any rock twice. | Hard9 | Binary searchGraph+2 | No attempts yet | 8s | 512 MB | Judgeable |
| Blue ForestGiven several planar floor maps that may be rigid-motion duplicates, unify matching maps, merge their warp gates, then find the shortest route from entrance to exit. | Hard9 | GeometryGraph+2 | No attempts yet | 8s | 512 MB | Judgeable |
| EggscavationGiven up to 100000 shell species (each in at most 4 cells) and egg insertions, answer queries for the probability that a random K x K scoop covers at least V species and no egg. | Hard9 | GeometryPrefix sum+2 | No attempts yet | 10s | 512 MB | Judgeable |
| MinerFor each lamp position above a polyline mine floor, find the reachable floor interval lit without crossing the floor. | Hard9 | GeometryBinary search+2 | No attempts yet | 1.5s | 512 MB | Judgeable |
| Rolling the BottleGiven a convex polygon as a bottle base and a water volume, find the minimum and maximum number of sides of the water region as the bottle rolls. | Hard9 | GeometrySorting+2 | No attempts yet | 2.5s | 512 MB | Judgeable |
| Omnicircumnavigation (Large)Given points on a unit sphere joined in order by shortest arcs, decide whether the closed path meets every great circle. | Hard9 | GeometryMath+2 | No attempts yet | 120s | 512 MB | Judgeable |
| Equivalent DeformationGiven two equal-area triangles, find the minimum number of vertex-sliding operations that map the first exactly onto the second. | Hard9 | GeometryImplementation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Arranging tilesGiven up to 14 convex tiles of equal height with cut corners, find the ordering and horizontal placement that minimizes the total frame width when packed side by side. | Hard9 | Dynamic programmingGeometry+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| CratersFind the shortest single closed fence that surrounds all circles at distance 10 or more, given each crater's center and radius. | Hard9 | GeometryDynamic programming+2 | No attempts yet | 2s | 512 MB | Judgeable |
| SkiingFind the shortest polygonal path from S down to F that crosses n horizontal gates in top-to-bottom order, and output its breakpoints. | Hard9 | GeometryGreedy+2 | No attempts yet | 1s | 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 |
| Secret AgentGiven a planar straight-line graph (castle walls) where crossing a wall costs its height, find the minimum cost to travel between successive query points, starting from infinity. | Hard9 | GraphGeometry+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Maximal polygon brightnessGiven a convex polygon and a sequence of vertex deletions, compute after each deletion the largest total length of edges that a single external light point can illuminate. | Hard9 | GeometryDynamic programming+2 | No attempts yet | 3s | 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 |
| United States of EurasiaSplit N points sorted by x into at most K contiguous groups, minimizing the largest squared diameter within any group. | Hard9 | Binary searchDynamic programming+2 | No attempts yet | 20s | 1024 MB | Judgeable |