Skip to content

Geometry -> Counting Geometry

Count intersections, lattice points, or union areas by mixing geometry primitives with combinatorics and data structures.

  • Topic slug: geometry/counting-geometry
  • Tutorial page: Open tutorial
  • Ladder page: Open ladder
  • Repo problems currently tagged here: 1
  • Repo companion pages: 0
  • Curated external problems: 6

Microtopics

  • Pick-theorem
  • lattice-points
  • intersection-counting
  • union-area
  • coordinate-compression
  • fenwick-or-segtree

Learning Sources

Source Type
cp-algorithms Pick's theorem Reference
cp-algorithms lattice points Reference
USACO Guide range queries with sweep line Reference

Practice Sources

Source Type
CSES Polygon Lattice Points Practice
CSES Intersection Points Practice
CSES Area of Rectangles Practice

Curated External Problems

Core

Problem Source Difficulty Context Style Prerequisites Tags Why it fits
Polygon Lattice Points CSES Medium - Counting GCD; Shoelace Formula Lattice Points; Pick's Theorem A perfect counting-geometry problem on polygons.
Right Triangles Codeforces Medium - Combinatorics Row/Column Counting Grid Geometry; Right Triangles A grid-counting geometry problem with a simple but elegant formula.
Satyam and Counting Codeforces Hard Triangles - - Points; Right-Triangles; Combinatorics A modern CF counting-geometry task with triangle counting flavor.
Triangles 3000 Codeforces Very Hard Lines - - Intersections; Triangle-Counting; Arrangements A high-end geometric counting problem on line arrangements.

Challenge

Problem Source Difficulty Context Style Prerequisites Tags Why it fits
Area of Rectangles CSES Hard Union-Area Coordinate Compression Interval Counting Area Union; Sweep Line; Measure; Events; Rectangle-Union Area accumulation from geometric event processing.
Intersection Points CSES Hard Sweep-Line Event Counting - Intersection Counting; Orthogonal-Segments; Events; Counts Counts geometric events rather than constructing explicit shapes.

Repo Problems

Code Title Fit Difficulty Pattern Note Solution
PRAVO Tam giác vuông secondary medium count right triangles; normalized directions; perpendicular pairing Note Code

Regeneration

python3 scripts/generate_problem_catalog.py