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
Escape from a RectangleGiven a point inside an axis-aligned rectangle, compute the minimum distance from the point to the nearest side of the rectangle.Easy1MathGeometry+1No attempts yet2s128 MBJudgeable
Taxicab GeometryGiven radius R, compute and print the area of a Euclidean circle and a taxicab-metric circle.Easy1MathGeometry+1No attempts yet1s128 MBJudgeable
The Navi-Computer is Down!Read pairs of 3D coordinates and system names, and print the Euclidean distance between each pair rounded to two decimals.Easy1MathImplementation+1No attempts yet1s128 MBJudgeable
AlienGiven a point and n axis-aligned rectangles, decide whether any rectangle contains the point, boundaries included.Easy1GeometryImplementation+2No attempts yet2s128 MBJudgeable
LifeguardThe task is to count children farther than k meters from the lifeguard position.Easy1GeometryMathNo attempts yet1s512 MBJudgeable
SticksGiven three stick lengths, print 2 if they form an equilateral triangle, 1 if only a right triangle, and 0 otherwise.Easy1MathGeometryNo attempts yet1s128 MBJudgeable
Plot of LandGiven N bead positions, compute the area of the smallest axis-aligned rectangle that contains them all.Easy1GeometryImplementationNo attempts yet1s128 MBJudgeable
Mosquito TrapFind the smallest area of an axis-aligned square that covers all given points on the table.Easy1GeometryNo attempts yet1s32 MBJudgeable
N-orthotopeGiven two axis-aligned boxes in N dimensions, print the dimension of their overlap, or -1 when they do not meet.Easy1ImplementationGeometryNo attempts yet1s256 MBJudgeable
Will floats still pass?Print a fixed two-point set, (0, 0) and (1, 1), with no input; the answer is a constant output.Easy1ImplementationGeometryNo attempts yet2s512 MBJudgeable
A debugging life that starts with std::sortPrint N = 2 and the two points (1, 0) and (0, 1), a fixed counterexample for a broken comparator in std::sort.Easy1ImplementationSorting+2No attempts yet2s512 MBJudgeable
Barn LotteryGiven N cows and a W by H barn, find how many L by L square spaces fit inside the barn, capped at N.Easy1MathImplementation+2No attempts yet1s1024 MBJudgeable
Fourth PointGiven two adjacent sides of a parallelogram as endpoint coordinates, compute and print the fourth vertex for each line of input.Easy2GeometryMath+1No attempts yet2s128 MBJudgeable
Fourth PointGiven three corners of an axis-aligned rectangle, compute the coordinates of the missing fourth corner.Easy2GeometryMath+1No attempts yet1s128 MBJudgeable
Angry ChangyoungFor each match length, decide if it fits diagonally inside a W by H rectangle and print DA or NE accordingly.Easy2GeometryMath+1No attempts yet1s128 MBJudgeable
Right TriangleRead triples of side lengths until 0 0 0, and print right if the squares of the two shorter sides sum to the square of the longest, else wrong.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
LogoTrack a turtle's position and heading through forward, backward, left, and right commands, then report the rounded distance from the start.Easy2SimulationGeometry+2No attempts yet1s128 MBJudgeable
Dog & GopherGiven the gopher's position, the dog's position, and a list of holes, find the first hole the gopher reaches no later than the dog.Easy2ImplementationGeometryNo attempts yet1s128 MBJudgeable
Fifty Coats of GrayGiven room dimensions, opening sizes, and the area one can covers, compute the total paintable area for n apartments and round up to whole cans.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
The Euclidean ClockGiven two clock times and a radius, find the area of the sector swept by the hour hand between them.Easy2MathGeometry+1No attempts yet1s128 MBJudgeable
Map InterfaceGiven station coordinates and a visited sequence, count how many stations fall inside the smallest axis-aligned rectangle covering the visited stations.Easy2ArrayImplementation+2No attempts yet1s128 MBJudgeable
Isn't It Funny How a Bear Likes Honey?Given Pooh's weight and the radii of several spherical helium balloons, decide whether their combined lift strictly exceeds his weight.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
Annoying MosquitosGiven up to 100 mosquito positions and up to 10000 swat centers, count how many mosquitos fall within the 101x101 square of at least one swat.Easy2Brute forceImplementation+1No attempts yet1s256 MBJudgeable
Triangle Validity and ClassificationRead lines of three side lengths, count valid triangles as right, acute, or obtuse, and stop at the first line that is not a triangle.Easy2ImplementationMath+2No attempts yet1s128 MBJudgeable
Color Me LessRead 16 target RGB colors, then map each following color to the nearest target color by Euclidean distance, breaking ties by earliest appearance.Easy2ImplementationBrute force+2No attempts yet1s128 MBJudgeable
Right Triangle CheckFor each of n triples of side lengths, decide whether the triangle is right by checking if the largest side squared equals the sum of the other two squared.Easy2MathGeometry+2No attempts yet1s128 MBJudgeable
KwadratDecide whether four given points are the vertices of a non-degenerate square with sides parallel to the axes.Easy2GeometryImplementationNo attempts yet1s128 MBJudgeable
Overlapping Rectangle AreaGiven two axis-aligned rectangles, compute the area of their overlapping region.Easy2GeometryNo attempts yet1s128 MBJudgeable
VicinityFor each query, count how many of the n points lie within distance d_v of the chosen base point, excluding the base point itself.Easy2Brute forceGeometryNo attempts yet1s128 MBJudgeable
Rectangle intersectionCompute the area shared by all n axis-aligned rectangles, or 0 when they do not all overlap.Easy2GeometryIntervalsNo attempts yet2s512 MBJudgeable
Hitting the TargetsCount, for each of up to 100 shot points, how many of up to 30 given rectangles and circles contain it, boundaries included.Easy2GeometryImplementationNo attempts yet2s256 MBJudgeable
ElectionFor each test case, count how many coins overlap each coin and print the top name or TIE on ties.Easy2GeometryBrute force+1No attempts yet1s256 MBJudgeable
The Big Eye in the SkyFor each point in the first quadrant, print its angle from the positive x-axis in degrees, rounded to the nearest integer.Easy2MathGeometryNo attempts yet1s256 MBJudgeable
Three Origami SquaresCut three equal axis-aligned squares from an h by w sheet and print the largest possible side length.Easy2GeometryMathNo attempts yet2s256 MBJudgeable
Turn Direction of Three PointsGiven three points in order, print 1, -1, or 0 depending on whether the path turns left, turns right, or runs straight.Easy2GeometryNo attempts yet1s256 MBJudgeable
FormulaGiven triangle vertex coordinates and a measured incircle radius, compute the radius from the formula and print the percentage difference.Easy2GeometryMath+1No attempts yet2s512 MBJudgeable
MatchesFor each match length, decide whether it fits in a W by H box, meaning its length is at most the diagonal sqrt(W^2+H^2).Easy2GeometryMath+1No attempts yet2s512 MBJudgeable
Anniversary CakeGiven a rectangle and two interior candles, output the specific cut described by a fixed rule that separates the candles.Easy2GeometryImplementation+1No attempts yet2s256 MBJudgeable
Soccer SkillsAmong all teammates whose distance from you is between a and b, print the position, distance, and angle of the one with smallest x then smallest y.Easy2ImplementationGeometry+1No attempts yet2s512 MBJudgeable
Santa's GiftsCompute the total straight-line distance from Santa's house through four given points in 3D and check it does not exceed the time limit X.Easy2MathGeometry+2No attempts yet5s512 MBJudgeable
Triangles from Five SticksGiven five distinct stick lengths, count how many 3-stick subsets can form a triangle with positive area.Easy2Brute forceGeometry+1No attempts yet2s512 MBJudgeable
Abbey CourtyardGiven the area of a square courtyard, compute the perimeter as 4 times the square root of the area, rounded to six decimal places.Easy2MathImplementation+1No attempts yet1s512 MBJudgeable
PLAYERJINAH’S BOTTLEGROUNDSGiven the coordinates of three distinct points, decide whether they lie on a single straight line.Easy2GeometryMath+1No attempts yet1s512 MBJudgeable
Bessie and DaisyGiven three points on a grid, compare Bessie's 8-direction distance with Daisy's 4-direction distance to John and say who arrives first.Easy2MathGeometry+1No attempts yet1s128 MBJudgeable
Pizza DealCompare a slice's area per price with a whole pizza's pi*R1^2 per price and print the better deal.Easy2MathGeometry+1No attempts yet1s512 MBJudgeable
HockeyCount how many given points lie inside or on the boundary of a stadium shape formed by a rectangle and two semicircular ends.Easy3GeometryImplementationNo attempts yet2s128 MBJudgeable
Eumha Railway 998Find the point on the train's straight-line path where it comes closest to a given station, guaranteed to have integer coordinates.Easy3GeometryMathNo attempts yet2s128 MBJudgeable
TriangleGiven three points, classify the triangle they form as degenerate, equilateral, isosceles or scalene, and further by its largest angle type.Easy3GeometryImplementation+1No attempts yet2s128 MBJudgeable
Polygon AreaGiven the ordered vertices of a simple polygon, compute its area using the shoelace formula, rounded to one decimal place.Easy3GeometryMath+1No attempts yet2s128 MBJudgeable
Melon FieldGiven an L-shaped rectilinear hexagon described by six directional side lengths, compute its area and multiply by a melon density constant.Easy3GeometryMath+1No attempts yet1s128 MBJudgeable
Rectangle Overlap TypeFor four pairs of axis-aligned rectangles, determine whether their intersection is a rectangle, a line segment, a point, or empty, printing a code letter per case.Easy3GeometryImplementationNo attempts yet1s128 MBJudgeable
DartsFor each test case, sum dartboard scores from coordinates for two players and print the winner or a tie.Easy3GeometrySimulation+1No attempts yet1s128 MBJudgeable
Visible Poster AreaGiven two axis-aligned rectangles, compute the visible area of the first rectangle after subtracting its overlap with the second.Easy3GeometryImplementation+1No attempts yet1s128 MBJudgeable
Build Your HomeCompute and round the area of each given simple polygon, including degenerate cases with fewer than three vertices, until a terminating zero.Easy3GeometryImplementation+1No attempts yet1s128 MBJudgeable
How I Wonder What You Are!For each dataset, count how many of the given stars fall within the angular radius of at least one of several telescopes all located at the origin.Easy3GeometryBrute force+1No attempts yet1s128 MBJudgeable
EuclidFor each case, find G and H so that ABGH is a parallelogram, H sits on ray AC, and the parallelogram's area equals triangle DEF's area.Easy3GeometryMath+1No attempts yet1s128 MBJudgeable
Brownie Points IGiven a fixed crossing point, split the remaining brownie points into the four quadrants and count Stan's two quadrants versus Ollie's two.Easy3GeometryImplementationNo attempts yet1s128 MBJudgeable
Teleporting Firefly ChaseSimulate a chase where the chaser repeatedly teleports a fixed distance toward each firefly flash and is caught if distance drops to 1 or less.Easy3SimulationGeometry+2No attempts yet1s128 MBJudgeable
Copier ReductionGiven an image and paper size in millimeters, find the largest integer percentage scale (with optional 90-degree rotation) that still fits on the paper.Easy3MathImplementation+2No attempts yet1s128 MBJudgeable
ExtrusionGiven the vertices of a polygon in clockwise order and a volume of metal, compute the polygon's area and divide to get the bar length.Easy3GeometryMath+2No attempts yet1s128 MBJudgeable
Beautiful TriangleGiven three vertices, classify the triangle by side lengths and by angles, or report that the points are collinear.Easy3GeometryMath+2No attempts yet1s128 MBJudgeable
SkylineWe have N trapezoidal buildings listed from nearest to farthest. For each building, we must compute the fraction of its area that remains visible, i.e., the part of the trapezoid not hidden by any closer building. The presence of overlapping sloped roofs makes the computation nontrivial: for a given building we need to determine, for each horizontal coordinate, the maximum roof height among all closer buildings. Then the visible area is the integral, over the building’s own range [x1, x2], of the positive part of the difference between the building's top edge (roof) and that maximum height.ForEasy3GeometryIntervals+2No attempts yet1s128 MBJudgeable
Sand CastlesGiven a rectangular patch, a perimeter moat, and cylindrical towers, compute how much the flat base level rises or falls so the sand volume stays fixed.Easy3GeometryMath+2No attempts yet1s128 MBJudgeable
School ColorsGiven up to 200 RGB colors, find every pair whose Euclidean distance is maximal and print the index pairs in sorted order.Easy3Brute forceGeometry+2No attempts yet1s128 MBJudgeable
Crop CirclesGiven N circles, count for each circle how many of the other circles it overlaps, using the strict distance-versus-sum-of-radii test.Easy3GeometryBrute force+2No attempts yet1s128 MBJudgeable
Lonesome PartnersGiven N points, find the 1-based indices of the two points with the largest Euclidean distance, guaranteed unique.Easy3Brute forceGeometry+2No attempts yet1s128 MBJudgeable
Game of LinesGiven N distinct lattice points, count how many distinct slopes the lines through pairs of points can have.Easy3Hash mapMath+2No attempts yet1s128 MBJudgeable
Serious Cow TagSimulate the elimination game where each active cow tags her nearest remaining cow, and report the last cow standing.Easy3SimulationGeometry+2No attempts yet1s128 MBJudgeable
There's treasure everywhere!Parse a map of step counts and compass directions, compute the treasure's coordinates, and print the straight-line distance from the origin.Easy3SimulationImplementation+2No attempts yet1s128 MBJudgeable
The Missing Side of a Right TriangleGiven two sides of a right triangle with one side marked -1, find the missing side or report that no right triangle exists.Easy3MathGeometry+2No attempts yet1s128 MBJudgeable
Circle Through Three PointsFor each line of three points, compute the circle through them and print its center-radius and general equations with signs adjusted.Easy3GeometryMath+2No attempts yet1s128 MBJudgeable
Donghyeok PizzaGiven a circular table of radius r and a rectangular pizza w by l, decide whether the rectangle fits inside the circle.Easy3GeometryMath+2No attempts yet1s128 MBJudgeable
EdgeGiven a string of A (clockwise) and V (counter-clockwise) turns, emit PostScript line commands tracing a unit-step path from a fixed start point.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
Polygon Programming with EaseGiven the midpoints of the edges of a polygon with an odd number of vertices, recover the original vertex coordinates using an alternating sum and forward substitution.Easy3MathGeometry+2No attempts yet1s128 MBJudgeable
GlobetrotterRead a list of cities with latitudes and longitudes, then for each query print the great-circle distance between two cities rounded to the nearest km.Easy3GeometryMath+2No attempts yet1s128 MBJudgeable
Circumference of a CircleFor each line of three non-collinear points, compute the perimeter of the circle passing through them, rounded to two decimals.Easy3GeometryMath+2No attempts yet1s128 MBJudgeable
Complicated RouteParse a route of step counts in eight compass directions, sum the displacement, and print the final point and its distance from the origin to three decimals.Easy3ImplementationMath+2No attempts yet1s128 MBJudgeable
Too Much WaterGiven a property point, compute the hour when the growing semicircle centered at the origin first covers it, using the fixed 50 square meters per hour rate.Easy3GeometryMath+2No attempts yet1s128 MBJudgeable
Ball BearingsGiven the inner diameter of an outer ring, the ball diameter, and the minimum gap between neighboring balls, find the maximum number of balls that fit.Easy3GeometryMath+2No attempts yet1s128 MBJudgeable
Hobbiton FarmsFor each test case, decide whether a circle and an axis-aligned rectangle share at least one point.Easy3GeometryImplementation+1No attempts yet1s128 MBJudgeable
CarpetsGiven up to three axis-aligned rectangles, find the total area of their union.Easy3GeometryImplementation+2No attempts yet1s1024 MBJudgeable
Untidy DesktopsGiven n axis-aligned rectangles, count how many overlap at least one other rectangle, boundaries included.Easy3GeometryBrute forceNo attempts yet7s128 MBJudgeable
Yeehaa!Given the large circle radius R and the count n of equal small circles packed around the inside rim, compute the small circle radius r.Easy3GeometryMath+1No attempts yet1s128 MBJudgeable
Kingdom SubdivisionGiven a simple polygon's integer vertices, output half its area as a reduced fraction p/q.Easy3GeometryMath+1No attempts yet2s256 MBJudgeable
Circle DrawingPaint circles onto a grid, later circles overwriting earlier ones, then print the final color of every pixel.Easy3SimulationGeometry+1No attempts yet3s128 MBJudgeable
Rectilinear Polygon With Area Equal to Its Vertex CountGiven n, print a canonical rectilinear polygon outline with n vertices and area n, or NIE when n is odd or below 4.Easy3ImplementationGeometry+2No attempts yet5s128 MBJudgeable
Rectangle ColoringCount the groups of overlapping rectangles where touching edges count as overlap and each group gets one color.Easy3Union-findGeometryNo attempts yet1s128 MBJudgeable
FenceScale the given convex polygon to enclose the target area and report the resulting fence length.Easy3GeometryMathNo attempts yet1s128 MBJudgeable
Bishop's minimum movesDecide whether a bishop can reach a target square and print the shortest route, breaking ties by lexicographic order.Easy3GeometryBrute forceNo attempts yet1s128 MBJudgeable
Where's the RainbowGiven the height of a semicircular rainbow and the viewing angle to its top, compute the distance from the origin to the nearest point of the arc.Easy3GeometryMathNo attempts yet1s128 MBJudgeable
GrachtenThree paced distances along two sight lines fix similar triangles that yield the canal width as a reduced fraction.Easy3GeometryMathNo attempts yet1s128 MBJudgeable
Village closenessGiven N points in 3D, find the smallest sum of Manhattan distances from one point to two other distinct points.Easy3Brute forceGeometryNo attempts yet1s128 MBJudgeable
Counting Communication GroupsCount the connected groups of camps whose circular communication areas touch or overlap.Easy3Union-findGeometryNo attempts yet8s256 MBJudgeable
Spiral Area DivisionGiven up to 100 points in an 80 by 80 square cut into 15 labeled pieces by alternating 3-to-1 splits, output the label containing each point.Easy3GeometrySimulation+1No attempts yet1s64 MBJudgeable
GraveDecide whether a fixed-orientation w by h rectangle fits inside the graveyard without entering the chapel interior.Easy3GeometryImplementationNo attempts yet2s256 MBJudgeable
Skyscraper SilhouetteRebuild the skyline picture from N ground-based rectangles, mark the border cells, and report the perimeter without the ground side.Easy3SimulationArray+1No attempts yet1s32 MBJudgeable
Folding CodeThe program reflects each folded corner across its fold line to find the ticked box and lists the chosen answers per question.Easy3GeometryImplementationNo attempts yet2s256 MBJudgeable
Geometry DartsCount how many circles, rectangles, and triangles contain each of six dart throws and name Bob, Hannah, or Tied as the winner of each game.Easy3GeometryBrute forceNo attempts yet1s256 MBJudgeable
Lifting WallsChoose the fewest of up to 30 crane sites so that each of the four wall centers is within reach of a chosen crane.Easy3Brute forceGeometryNo attempts yet1s256 MBJudgeable
Covering an equilateral triangleGiven side lengths A and B with A divisible by B, compute the minimum number of side-B equilateral triangles that cover a side-A equilateral triangle.Easy3MathGeometryNo attempts yet1s256 MBJudgeable