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,924 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| Xeno-archaeology (Small)Given colored tiles from an infinite square ring pattern, find the pattern center that fits all tiles with the stated tie breaks. | Medium6 | Brute forceMath+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Shoot the Target (Small1)Given a slanted segment above the x-axis, find the point on the x-axis that sees the segment under the largest angle and print that angle in degrees. | Medium6 | GeometryMath | No attempts yet | 5s | 512 MB | Judgeable |
| Shoot the TargetPick the ground point on the x-axis that makes the given segment look widest and output that largest angle in degrees. | Medium6 | GeometryMath | No attempts yet | 5s | 512 MB | Judgeable |
| Sunlight Hours (Small)Compute the share of building height that gets at least H hours of direct sun as the sun travels a semicircular path past blocking buildings. | Medium6 | GeometryBinary search | No attempts yet | 5s | 512 MB | Judgeable |
| Antenna repair (Large)Arrange the given rod lengths on equally spaced rays around one point to maximize the sum of neighboring triangle areas. | Medium6 | CombinatoricsSorting+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Center of Mass of a Firefly SwarmEach firefly moves linearly at constant velocity; find the minimum distance from the origin to the swarm's center of mass over t >= 0 and the earliest time it occurs, printed to eight exact decimals. | Medium6 | MathGeometry+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Triangle TransformationGiven two triangles where the second lies inside the first, find the fixed point of the rotation, scaling, and translation map taking one to the other. | Medium6 | GeometryMath+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Triangle AreasGiven N, M, A, find three lattice points in an N by M grid forming a triangle of area exactly A/2, printing the lexicographically smallest coordinate sequence or IMPOSSIBLE. | Medium6 | GeometryMath+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Mixture (Small)Find the amounts of two mixtures a and b maximizing revenue under shared material limits, then round the optimum to two decimals. | Medium6 | GeometryBrute force+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Gennady is smartMaintain counts on a hexagonal grid; each update adds 1 to all cells within distance r of (x, y), and queries ask for a single cell's value. | Medium6 | Prefix sumMatrix+1 | No attempts yet | 2s | 256 MB | Judgeable |
| New TreeGiven point A and a new tree, find the smallest pair (B, C) so triangle ABC is counterclockwise, contains the new tree strictly, and contains no other old tree. | Medium6 | GeometryBrute force | No attempts yet | 0.2s | 1024 MB | Judgeable |
| Tidying upPlace N points so the configuration is symmetric about the y-axis with equal multiplicities; minimize the total Euclidean distance moved. | Medium6 | GeometryGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Stock ChartsGiven N piecewise-linear price graphs over K time points, find the minimum number of charts so that no two graphs on a chart intersect. | Medium6 | GeometryIntervals+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Points and LinesParse an expression of points and lines joined by @, evaluate geometric operations, and print the resulting point rounded to 8 decimals. | Medium6 | ImplementationMath+1 | No attempts yet | 8s | 512 MB | Judgeable |
| Pizza PlacementPlace circles tangent to two legs of a right triangle without overlapping earlier ones; report the area of the k-th largest. | Medium6 | GeometryMath+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Unusual DartsGiven seven dart positions forming a simple polygon in some unknown order and the win probability of a random three-dart throw, find the dart order that matches it. | Medium6 | GeometryBrute force+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Obstacle Course RunGiven vertical wall segments, find the shortest eastbound route from a start point to a finish line and list the y coordinates of all distinct endpoints of shortest routes. | Medium6 | GeometryGraph+2 | No attempts yet | 2s | 512 MB | Judgeable |
| The sun goes down...Given up to 100000 distinct points in the plane, decide whether two straight lines can cover all of them. | Medium6 | GeometryBrute force+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Circles tangent to a lineArrange N given circles on one side of a line, each touching it, without interiors overlapping, and minimize the span between the leftmost and rightmost touch points. | Medium6 | Brute forceGeometry+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Robert FloydStitches walks up to 2048 unit steps on a huge grid, leaving bile on each edge crossed, and you must count the regions the bile walls split the map into. | Medium6 | GeometrySimulation+1 | No attempts yet | 1.2s | 256 MB | Judgeable |
| Manhattan Positioning SystemGiven beacons with known grid positions and Manhattan distances to an unknown receiver, decide whether the receiver position is unique, ambiguous, or impossible. | Medium6 | GeometryMath+1 | No attempts yet | 2s | 512 MB | Judgeable |
| DolphinsSimulate fish that swim one unit away from a dolphin each step, and count how many trajectories hit the net polygon. | Medium6 | GeometrySimulation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Spheres and queriesGiven N points in 3D and M spheres, answer for each sphere how many points lie inside it, counting boundary points. | Medium6 | GeometrySorting+2 | No attempts yet | 20s | 512 MB | Judgeable |
| Martian VolleyballGiven an axis-parallel polygon, find the minimum number of points outside the court such that every side has a point on its supporting line. | Medium6 | GeometryGraph+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Incident in AtlantisGiven line-segment walls, up to 50 booths, and a teleport budget T, find the shortest walk from start to portal where teleports happen only between booths with an unobstructed segment. | Medium6 | GeometryShortest path+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Lightning StrikeFor each test case, compute the area of a circle cut by an infinite wedge with a given apex, direction, and spread angle. | Medium6 | GeometryMath+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Cell phone towersGiven up to 40 house coordinates, find the smallest common radius so that two circles of that radius can cover every house. | Medium6 | GeometryBinary search+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Friends or Enemies?For each query number pair, find the points on a clockwise square spiral, then check whether they lie on the same side of a given line. | Medium6 | GeometryMath+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Circle Containing All PointsGiven N points, find the diameter of the smallest enclosing circle, printed to two decimals. | Medium6 | GeometryBrute force | No attempts yet | 2s | 512 MB | Judgeable |
| Construction ToyGiven up to nine distinct segment lengths, find the largest possible distance from a wall reachable by gluing triangles onto an initial base segment. | Medium6 | GeometryBacktracking+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Windy PathGiven N points and a string of L/R turns, build the non-crossing path by repeatedly picking the unused point that is extreme (leftmost or rightmost) relative to the last point. | Medium6 | GeometryGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Robot Arm Inverse KinematicsGiven segment lengths and a target hand position for a robot arm with equal joint angles, recover the base angle and joint angle that reach it. | Medium6 | GeometryBinary search+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Safe AreaGiven a rectangular screen, circular machine radius, and laser lines with thickness, decide if some circle center avoids all beams. | Medium6 | GeometryImplementation | No attempts yet | 8s | 512 MB | Judgeable |
| Area between a lattice path and its chordGiven a monotone path of up and right steps, compute the total area between the path and the straight chord from start to end. | Medium6 | GeometryPrefix sum+2 | No attempts yet | 8s | 512 MB | Judgeable |
| Tiling PolygonsTile a rectilinear polygon with 1x3 and 3x1 tiles, choosing at each step the lexicographically smallest covering grid. | Medium6 | BacktrackingRecursion+2 | No attempts yet | 8s | 512 MB | Judgeable |
| Stupendous BowtiesGiven N distinct integer points, count unordered pairs of axis-aligned right triangles that share only the right-angle vertex. | Medium6 | GeometryCombinatorics+2 | No attempts yet | 2s | 512 MB | Judgeable |
| AliensGiven N points, choose an integer axis value s minimizing new points needed so the set is symmetric about x = s/2, then output those points. Ties go to the smallest s, output sorted by x then y. | Medium6 | Hash mapSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| TrokutGiven two numbers in this triangular arrangement, list every third number that completes an equilateral triangle with sides parallel to the 1-2-3 grid. | Medium6 | MathGeometry | No attempts yet | 0.5s | 256 MB | Judgeable |
| ArchitectGiven N tree points and Q axis-aligned polygons of at most 12 vertices, count for each polygon how many trees lie inside it, border included. | Medium6 | GeometryArray+2 | No attempts yet | 1s | 64 MB | Judgeable |
| Guard dogFind an integer lattice point on a square roof where a chain can be anchored so it reaches every hatch center without leaving the roof, choosing the smallest coordinates. | Medium6 | GeometryBrute force+2 | No attempts yet | 1s | 64 MB | Judgeable |
| Cow ChecklistFind the cheapest path that visits all Holsteins in order and all Guernseys in order, starting at Holstein 1 and ending at Holstein H. | Medium6 | Dynamic programmingGeometry | No attempts yet | 2s | 512 MB | Judgeable |
| Plane GameGiven N points, rotate and translate them arbitrarily so that as many points as possible lie on the two coordinate axes; output that maximum count. | Medium6 | GeometryBrute force+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Armistice NegotiationGiven two sets of points, decide whether a straight line exists that keeps each country's cities strictly on opposite sides. | Medium6 | GeometryDivide and conquer+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Impromptu Outdoor GalleryGiven N points in general position, find twice the smallest area of a simple quadrilateral formed by four of them. | Medium6 | GeometryBrute force | No attempts yet | Not set | 1024 MB | Judgeable |
| Trapezoid puzzleTile a triangular-grid hexagon of shaded cells with 3-triangle trapezoids, backtracking in a fixed canonical order and colouring pieces greedily so no two equal colours share an edge. | Medium6 | BacktrackingGreedy+2 | No attempts yet | 0.5s | 1024 MB | Judgeable |
| Impossible DesignGiven the circle order of a permutation of 0 to N-1, decide whether chords drawn between every pair at height x+y ever intersect. | Medium6 | GeometryCombinatorics+1 | No attempts yet | 1s | 128 MB | Judgeable |
| The Climbing WallGiven holds on a wall, find the fewest holds Bessie must step on to climb from within 1000 mm of the ground to within 1000 mm of the top, moving only between holds at most 1000 mm apart. | Medium6 | GraphBFS+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Punching PowerChoose the largest subset of given grid points so every pair is more than 1.3 meters apart. | Medium6 | GraphGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| HipercampoGiven two anchors on the x-axis and N points above, choose the largest subset whose segments to both anchors meet only at the anchors. | Medium6 | GeometrySorting+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| Honey HeistBuild the adjacency of a hexagonal honeycomb of side R, remove wax cells, and find the shortest number of chewed cells from A to B, checking it against N. | Medium6 | GraphBFS+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Straight ShotChoose a fixed heading so a robot crossing north-south moving sidewalks lands at (X,0); report the travel time or "Too hard" if it exceeds 2X/v. | Medium6 | MathBinary search+1 | No attempts yet | 1s | 512 MB | Judgeable |
| Move AwayFind the farthest point from the origin inside the intersection of n disks and print that distance rounded to three decimals. | Medium6 | GeometryBinary search | No attempts yet | 2s | 512 MB | Judgeable |
| Asphalt PavingGiven segments on a triangular grid, choose the largest subset so that no two share an endpoint at an acute angle. | Medium6 | GraphDynamic programming+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Rock ClimbingGiven n anchor points and a four-limb climbing model with pairwise distance and height limits, find the fewest moves to touch location n. | Medium6 | BFSGraph+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Basketball rebound placementGiven opposing and candidate positions plus rebound spot probabilities, choose 5 of n candidate spots to maximize expected points from the resulting fast-break race. | Medium6 | Brute forceCombinatorics+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Particle CollisionThree equal circles at rest; particle 1 moves along a given vector and transfers motion on contact. Decide which of five collision chains occurs. | Medium6 | GeometrySimulation+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Designing the ToyGiven three target projection areas a, b, c, find the minimum number of voxels in a 3D figure whose three orthogonal projections have those exact areas, or report -1. | Medium6 | MathGreedy+2 | No attempts yet | 3s | 512 MB | Judgeable |
| A Packing ProblemGiven a rectangle and two circles, decide whether both circles fit inside the rectangle without overlapping, allowing tangency. | Medium6 | GeometryMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Greeting CardCount how many pairs of given lattice points lie exactly 2018 units apart. | Medium6 | Hash mapMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Origami, or the Art of Folding PaperFold a rectangle several times along axis-aligned lines, punch holes in the folded stack, and count how many holes each punch makes in the unfolded sheet. | Medium6 | SimulationImplementation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Water TestingGiven the corner points of a simple polygon in order, count the integer lattice points that lie strictly inside it. | Medium6 | GeometryMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Racing Around the AlphabetCompute the running time for a player who follows a message's characters around 28 marks on a circle, using the shortest arc between marks and 1 second per pickup. | Medium6 | MathGeometry+2 | No attempts yet | 2s | 512 MB | Judgeable |
| The Circumcenter and the Incenter Are LoveGiven circumradius R and inradius r, output the floor of the squared distance between a triangle's circumcenter and incenter using Euler's formula R^2 - 2Rr. | Medium6 | MathGeometry | No attempts yet | 1s | 512 MB | Judgeable |
| Horse RidingPlace the square's corners at (0,0), (b,0), (0,b), (b,b), compute A's coordinates from its distances to two adjacent corners, then output the squared distance to the point m along the side between them. | Medium6 | GeometryMath+1 | No attempts yet | 1s | 512 MB | Judgeable |
| Triangle HackerGiven the three side lengths of an acute triangle, compute its area, circumradius, inradius, circumcenter-incenter distance, and the sum of the circumcenter's perpendicular distances to the sides. | Medium6 | MathGeometry | No attempts yet | 1s | 512 MB | Judgeable |
| Oblongs and Right TrianglesCount 4-black-point sets forming a non-square rectangle and 3-white-point sets forming a right triangle, disjoint and with positive area. | Medium6 | Brute forceGeometry+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Traveling Salesman 3Find the minimum-length round trip that visits all N cities exactly once and returns to the start, where N is at most 16. | Medium6 | Dynamic programmingBit manipulation+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Horse DrawingGiven axis-aligned segments and a point T, keep every segment connected to a segment through T, then print the minimal bounding grid marking drawn points with '#'. | Medium6 | GraphBFS+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Line Segment Intersection 2Given two line segments by their integer endpoints, decide whether they intersect, counting endpoint touching as an intersection. | Medium6 | GeometryMath+2 | No attempts yet | 0.25s | 512 MB | Judgeable |
| CanalPlace one horizontal and one vertical line so the largest distance from any given point to the nearer line is minimized, and print that distance. | Medium6 | Binary searchSorting+2 | No attempts yet | 1.5s | 512 MB | Judgeable |
| ZiplineFor each zipline, find the minimum and maximum cable length so the rider's lowest point stays at least r meters above the flat ground. | Medium6 | GeometryBinary search+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| TriangleGiven N plane points and Q query points, count epsilon-isosceles triangles having the query point as vertex and two distinct given points as the others, where two side lengths differ by less than 0.0001. | Medium6 | GeometryHash map+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Keep Him InsideGiven a convex polygon of guard points and an interior prisoner point, assign nonnegative weights summing to 1 whose weighted average equals the prisoner. | Medium6 | GeometryMath+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Beer VisionCount the nonzero shift vectors (X, Y) for which some set of stars, shifted by that vector, equals the given set of points. | Medium6 | Hash mapGeometry+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Building BoundariesGiven three axis-aligned rectangles that can rotate in place, find the minimum area of a bounding rectangle that holds them without overlap. | Medium6 | GeometryBrute force+2 | No attempts yet | 1s | 512 MB | Judgeable |
| BoulderingOn a grid of holds with grip costs, find the minimum total Euclidean path length from the bottommost hold to the topmost hold, where consecutive holds must be within reach r and total cost stays at most s. | Medium6 | GraphShortest path+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Smallest Regular SubpolygonGiven a regular N-gon, find the smallest number of its vertices that themselves form a regular polygon. | Medium6 | Number theoryMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Model CrystalGiven the number of sides A and a temperature drop B, count the minimal crystals in the growing regular polygon. | Medium6 | MathImplementation+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| VisibilityGiven N grid points, count ordered pairs (X, Y) such that Y lies strictly inside the 60 degree wedge opening south from X. | Medium6 | GeometrySorting+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Cosmic CleanerFor each test case, compute the total volume of the parts of n non-overlapping asteroids that lie inside a larger cleaning sphere. | Medium6 | GeometryMath+1 | No attempts yet | 2s | 512 MB | Judgeable |
| RainsGiven a grid of regular N-gons with side S and a brain of radius R, find the probability a random brain center lands close enough to a thread to be cut. | Medium6 | GeometryProbability+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Triangles (Silver)Given N points, sum twice the areas of all right triangles whose legs are parallel to the axes, modulo 1e9+7. | Medium6 | MathGeometry+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Intersection of ParabolasFind the area of the region bounded by the parabolas y=(x-a)^2 and x=(y-a)^2, given a up to 10^18, printed to exactly 10 decimals. | Medium6 | MathGeometry+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Triangle PartitionGiven 3n points with no three collinear, partition all of them into n disjoint triangles and output the indices used by each triangle. | Medium6 | GeometrySorting+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Flat EarthGiven a sphere and a plane, compute the area of the sphere's orthogonal projection onto the plane. | Medium6 | GeometryMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Broken Line 01Given dots with distinct x and y coordinates, construct a horizontal/vertical broken line from the origin that passes through every dot, minimizing segments for partial score. | Medium6 | GreedySorting+2 | No attempts yet | 0.1s | 512 MB | Judgeable |
| Broken Line 02Construct a rectilinear broken line from the origin that passes through every given dot, minimizing the number of segments; scored by segment count. | Medium6 | SortingGreedy+2 | No attempts yet | 0.1s | 512 MB | Judgeable |
| Broken Line 10Given n points with distinct x and y, output a rectilinear broken line from the origin that passes through every point, using few segments. | Medium6 | SortingGreedy+2 | No attempts yet | 0.1s | 512 MB | Judgeable |
| Convex Polygon Intersection AreaGiven two convex polygons with vertices in counterclockwise order, compute the exact area of their intersection region within a tight error tolerance. | Medium7 | GeometryDivide and conquer+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Tilted Square DisplayPlace 45-degree tilted squares along the x-axis one by one without overlap, then find which squares are visible when viewed from directly above. | Medium7 | GeometrySimulation+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Teacher Cho ForceGiven a moving catcher and N moving students, compute the maximum number of students that can simultaneously lie within radius R at any nonnegative time. | Medium7 | IntervalsMath+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Running CourseGiven up to 100,000 2D points, compute the squared distance between the farthest pair of points. | Medium7 | GeometrySorting+2 | No attempts yet | 2s | 256 MB | Judgeable |
| Jimin and Hansu's Orchard SplitGiven up to 50 weighted points on a plane, find a line avoiding all points that splits them into two groups minimizing the difference of their value sums. | Medium7 | GeometrySorting+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Candy Stair ClimbFind the maximum candies collectible by jumping between horizontal stair segments within distance K, never decreasing height, starting from the ground. | Medium7 | Topological sortGraph+2 | No attempts yet | 2s | 128 MB | Judgeable |
| HoneycombMap spiral-numbered hexagonal rooms to coordinates and print the room numbers along a shortest hex-grid path between two given rooms. | Medium7 | GeometryMath+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Number of PolygonsGiven up to 50 lines defined by point pairs, compute the number of bounded convex polygonal regions formed by their arrangement. | Medium7 | GeometryMath+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Distance Conditions for Four PointsGiven all pairwise distances among four points as a 4x4 integer matrix, decide if distinct points realizing these distances exist in 3D space. | Medium7 | GeometryMath+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Paper OverlayOverlay two grid papers, each freely rotated, flipped, and positioned, then find the largest all-X rectangle in the combined grid. | Medium7 | MatrixBrute force+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Restoring a PictureRestore the minimum number of white cells to black in a corrupted grid so every black group becomes row and column convex and connected again. | Medium7 | MatrixBFS+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Number of DrawingsGiven T polylines defined by their points, count how many separate connected drawings form when polylines that touch or overlap are merged into one group. | Medium7 | GeometryUnion-find+2 | No attempts yet | 2s | 128 MB | Judgeable |