problem stringlengths 1.19k 65.4k | solution stringlengths 1.19k 67.5k | topic stringlengths 5 80 |
|---|---|---|
---
title
intersecting_segments
---
# Search for a pair of intersecting segments
Given $n$ line segments on the plane. It is required to check whether at least two of them intersect with each other.
If the answer is yes, then print this pair of intersecting segments; it is enough to choose any of them among several ... | ---
title
intersecting_segments
---
# Search for a pair of intersecting segments
Given $n$ line segments on the plane. It is required to check whether at least two of them intersect with each other.
If the answer is yes, then print this pair of intersecting segments; it is enough to choose any of them among several ... | Search for a pair of intersecting segments |
---
title
segments_intersection_checking
---
# Check if two segments intersect
You are given two segments $(a, b)$ and $(c, d)$.
You have to check if they intersect.
Of course, you may find their intersection and check if it isn't empty, but this can't be done in integers for segments with integer coordinates.
The a... | ---
title
segments_intersection_checking
---
# Check if two segments intersect
You are given two segments $(a, b)$ and $(c, d)$.
You have to check if they intersect.
Of course, you may find their intersection and check if it isn't empty, but this can't be done in integers for segments with integer coordinates.
The a... | Check if two segments intersect |
---
title
- Original
---
# Convex hull trick and Li Chao tree
Consider the following problem. There are $n$ cities. You want to travel from city $1$ to city $n$ by car. To do this you have to buy some gasoline. It is known that a liter of gasoline costs $cost_k$ in the $k^{th}$ city. Initially your fuel tank is emp... | ---
title
- Original
---
# Convex hull trick and Li Chao tree
Consider the following problem. There are $n$ cities. You want to travel from city $1$ to city $n$ by car. To do this you have to buy some gasoline. It is known that a liter of gasoline costs $cost_k$ in the $k^{th}$ city. Initially your fuel tank is emp... | Convex hull trick and Li Chao tree |
---
title
- Original
---
# Basic Geometry
In this article we will consider basic operations on points in Euclidean space which maintains the foundation of the whole analytical geometry.
We will consider for each point $\mathbf r$ the vector $\vec{\mathbf r}$ directed from $\mathbf 0$ to $\mathbf r$.
Later we will n... | ---
title
- Original
---
# Basic Geometry
In this article we will consider basic operations on points in Euclidean space which maintains the foundation of the whole analytical geometry.
We will consider for each point $\mathbf r$ the vector $\vec{\mathbf r}$ directed from $\mathbf 0$ to $\mathbf r$.
Later we will n... | Basic Geometry |
---
title
circles_intersection
---
# Circle-Circle Intersection
You are given two circles on a 2D plane, each one described as coordinates of its center and its radius. Find the points of their intersection (possible cases: one or two points, no intersection or circles coincide).
## Solution
Let's reduce this prob... | ---
title
circles_intersection
---
# Circle-Circle Intersection
You are given two circles on a 2D plane, each one described as coordinates of its center and its radius. Find the points of their intersection (possible cases: one or two points, no intersection or circles coincide).
## Solution
Let's reduce this prob... | Circle-Circle Intersection |
---
title
segments_intersection
---
# Finding intersection of two segments
You are given two segments AB and CD, described as pairs of their endpoints. Each segment can be a single point if its endpoints are the same.
You have to find the intersection of these segments, which can be empty (if the segments don't int... | ---
title
segments_intersection
---
# Finding intersection of two segments
You are given two segments AB and CD, described as pairs of their endpoints. Each segment can be a single point if its endpoints are the same.
You have to find the intersection of these segments, which can be empty (if the segments don't int... | Finding intersection of two segments |
---
title
convex_hull_graham
---
# Convex Hull construction
In this article we will discuss the problem of constructing a convex hull from a set of points.
Consider $N$ points given on a plane, and the objective is to generate a convex hull, i.e. the smallest
convex polygon that contains all the given points.
We w... | ---
title
convex_hull_graham
---
# Convex Hull construction
In this article we will discuss the problem of constructing a convex hull from a set of points.
Consider $N$ points given on a plane, and the objective is to generate a convex hull, i.e. the smallest
convex polygon that contains all the given points.
We w... | Convex Hull construction |
---
title
voronoi_diagram_2d_n4
---
# Delaunay triangulation and Voronoi diagram
Consider a set $\{p_i\}$ of points on the plane.
A **Voronoi diagram** $V(\{p_i\})$ of $\{p_i\}$ is a partition of the plane into $n$ regions $V_i$, where $V_i = \{p\in\mathbb{R}^2;\ \rho(p, p_i) = \min\ \rho(p, p_k)\}$.
The cells of th... | ---
title
voronoi_diagram_2d_n4
---
# Delaunay triangulation and Voronoi diagram
Consider a set $\{p_i\}$ of points on the plane.
A **Voronoi diagram** $V(\{p_i\})$ of $\{p_i\}$ is a partition of the plane into $n$ regions $V_i$, where $V_i = \{p\in\mathbb{R}^2;\ \rho(p, p_i) = \min\ \rho(p, p_k)\}$.
The cells of th... | Delaunay triangulation and Voronoi diagram |
---
title
nearest_points
---
# Finding the nearest pair of points
## Problem statement
Given $n$ points on the plane. Each point $p_i$ is defined by its coordinates $(x_i,y_i)$. It is required to find among them two such points, such that the distance between them is minimal:
$$ \min_{\scriptstyle i, j=0 \ldots n-... | ---
title
nearest_points
---
# Finding the nearest pair of points
## Problem statement
Given $n$ points on the plane. Each point $p_i$ is defined by its coordinates $(x_i,y_i)$. It is required to find among them two such points, such that the distance between them is minimal:
$$ \min_{\scriptstyle i, j=0 \ldots n-... | Finding the nearest pair of points |
---
title: Point location in O(log n)
title
- Original
---
# Point location in $O(log n)$
Consider the following problem: you are given a [planar subdivision](https://en.wikipedia.org/wiki/Planar_straight-line_graph) without no vertices of degree one and zero, and a lot of queries.
Each query is a point, for which w... | ---
title: Point location in O(log n)
title
- Original
---
# Point location in $O(log n)$
Consider the following problem: you are given a [planar subdivision](https://en.wikipedia.org/wiki/Planar_straight-line_graph) without no vertices of degree one and zero, and a lot of queries.
Each query is a point, for which w... | Point location in $O(log n)$ |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 29