split geo

This commit is contained in:
Benjamin Qi 2020-06-22 17:07:07 -04:00
parent ee4e9e7762
commit 1bb72398c5
4 changed files with 57 additions and 44 deletions

View file

@ -1,8 +1,8 @@
---
id: geo
title: "Geometry"
id: geo-pri
title: "Geometry Primitives"
author: Benjamin Qi
description: Geometry primitives and convex hull.
description: Basic setup for geometry problems and introduction to line sweep.
---
## Primitives
@ -16,7 +16,6 @@ You should know basic operations like cross product and dot product. For platinu
- convex hulls
- polygon area
- point in polygon
- closest pair of points
- CPH 29
- [TopCoder - Basic Geometry Concepts](https://www.topcoder.com/community/competitive-programming/tutorials/geometry-concepts-basic-concepts/)
- [CF - Point Class](https://codeforces.com/blog/entry/48122)
@ -53,40 +52,3 @@ You should know basic operations like cross product and dot product. For platinu
- [Cow Steepchase II (Silver)](http://www.usaco.org/index.php?page=viewproblem2&cpid=943)
- :|
- [Kattis Closest Pair](https://open.kattis.com/problems/closestpair2)
## [Convex Hull](https://en.wikipedia.org/wiki/Convex_hull_algorithms)
- [Kattis Convex Hull](https://open.kattis.com/problems/convexhull)
### Tutorial
- Graham Scan
- [cp-algo](https://cp-algorithms.com/geometry/grahams-scan-convex-hull.html)
- [My Implementation](https://github.com/bqi343/USACO/blob/master/Implementations/content/geometry%20(13)/Polygons/ConvexHull2.h)
- Monotone Chain
- CPH 30.3 (brief)
- [Wikipedia](https://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain)
- [My Implementation](https://github.com/bqi343/USACO/blob/master/Implementations/content/geometry%20(13)/Polygons/ConvexHull%20(13.2).h)
### Problems
- [USACO Plat Balance](http://www.usaco.org/index.php?page=viewproblem2&cpid=864)
- [USACO Plat Falling](http://www.usaco.org/index.php?page=viewproblem2&cpid=998)
- [USACO Old Gold - Fencing](http://www.usaco.org/index.php?page=viewproblem2&cpid=534)
- [USACO Old Gold - Cow Curling](http://www.usaco.org/index.php?page=viewproblem2&cpid=382)
- [Kattis Fence Orthogonality](https://open.kattis.com/problems/fenceortho)
- [AGC 44 Random Pawn](https://atcoder.jp/contests/agc044/tasks/agc044_e)
- Generalization of "Balance"
## Half-Plane Intersection / Convex Stuff
- [Blogewoosh (Half-Plane Intersection w/ Ternary Search)](https://codeforces.com/blog/entry/61710)
- [retrograd Half-Plane Intersection](https://codeforces.com/blog/entry/61710?#comment-457662)
- [Petr (Linear Half-Plane Intersection)](https://petr-mitrichev.blogspot.com/2016/07/a-half-plane-week.html)
- [KACTL LineContainer](https://github.com/kth-competitive-programming/kactl/blob/master/content/data-structures/LineContainer.h)
- [Lichao Segment Tree](http://codeforces.com/blog/entry/51275?#comment-351510)
### Problems
- [Bridges](https://csacademy.com/contest/archive/task/building-bridges/)
- direct application of LineContainer

45
content/6_Plat/Hull.md Normal file
View file

@ -0,0 +1,45 @@
---
id: hull
title: "Convex Hull"
author: Benjamin Qi
description: Smallest convex polygon containing a set of points on a grid.
---
## [Convex Hull](https://en.wikipedia.org/wiki/Convex_hull_algorithms)
- [Kattis Convex Hull](https://open.kattis.com/problems/convexhull)
### Tutorial
- Graham Scan
- [cp-algo](https://cp-algorithms.com/geometry/grahams-scan-convex-hull.html)
- [My Implementation](https://github.com/bqi343/USACO/blob/master/Implementations/content/geometry%20(13)/Polygons/ConvexHull2.h)
- Monotone Chain
- CPH 30.3 (brief)
- [Wikipedia](https://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain)
- [My Implementation](https://github.com/bqi343/USACO/blob/master/Implementations/content/geometry%20(13)/Polygons/ConvexHull%20(13.2).h)
### Problems
- [USACO Plat Balance](http://www.usaco.org/index.php?page=viewproblem2&cpid=864)
- [USACO Plat Falling](http://www.usaco.org/index.php?page=viewproblem2&cpid=998)
- [USACO Old Gold - Fencing](http://www.usaco.org/index.php?page=viewproblem2&cpid=534)
- [USACO Old Gold - Cow Curling](http://www.usaco.org/index.php?page=viewproblem2&cpid=382)
- [Kattis Fence Orthogonality](https://open.kattis.com/problems/fenceortho)
- [AGC 44 Random Pawn](https://atcoder.jp/contests/agc044/tasks/agc044_e)
- Generalization of "Balance"
Minkowski addition?
## Half-Plane Intersection / Convex Stuff
- [Blogewoosh (Half-Plane Intersection w/ Ternary Search)](https://codeforces.com/blog/entry/61710)
- [retrograd Half-Plane Intersection](https://codeforces.com/blog/entry/61710?#comment-457662)
- [Petr (Linear Half-Plane Intersection)](https://petr-mitrichev.blogspot.com/2016/07/a-half-plane-week.html)
- [KACTL LineContainer](https://github.com/kth-competitive-programming/kactl/blob/master/content/data-structures/LineContainer.h)
- [Lichao Segment Tree](http://codeforces.com/blog/entry/51275?#comment-351510)
### Problems
- [Bridges](https://csacademy.com/contest/archive/task/building-bridges/)
- direct application of LineContainer

View file

@ -4,7 +4,7 @@ title: "Slope Trick"
author: Benjamin Qi
prerequisites:
-
- some familiarity with at least one of the two tutorials mentioned in this module
- Platinum - Convex Hull
description: Ways to manipulate piecewise linear convex functions.
---
@ -22,7 +22,7 @@ From the latter link (modified):
> - It can be divided into multiple sections, where each section is a linear function (usually) with an integer slope.
> - It is a convex/concave function. In other words, the slope of each section is non-decreasing or non-increasing when scanning the function from left to right.
It's generally applicable as a DP optimization. Usually you can come up with a slower DP (ex. $O(N^2)$) first and then optimize it to $O(N\log N)$ with slope trick.
It's generally applicable as a DP optimization. Usually you can come up with a slower DP (ex. $O(N^2)$) first and then optimize it to $O(N\log N)$ with slope trick. The rest of this module assumes that you are somewhat familiar with at least one of the tutorials mentioned above.
## [Buy Low Sell High](https://codeforces.com/contest/866/problem/D)

View file

@ -138,7 +138,13 @@ const ModuleOrdering = {
"string-search",
]
},
"geo",
{
name: "Geometry",
items: [
"geo-pri",
"hull",
]
},
"bitsets",
"fracture",
]