Академический Документы
Профессиональный Документы
Культура Документы
) (
2
1
. .
. .
2
1
mod 1 mod 1
1
i n i n i
i
i
y x y x A
+ +
=
= =
. .
n n
y x
is_convex;point_in_polygon;
cut_polygon
Explanationviaillustration
CS3233 CompetitiveProgramming,
StevenHalim,SoC,NUS
Convex Hull Problem ConvexHullProblem
TheConvexHullofasetofpointsPisthesmallest
convexpolygonCH(P)forwhicheachpointinPis
eitherontheboundaryofCH(P)orinitsinterior
CS3233 CompetitiveProgramming,
StevenHalim,SoC,NUS
Graham Scans Algorithm for CH GrahamScan sAlgorithmforCH
1. Findpivot(bottommost,rightmostpoint)
2. Angularsortingw.r.t pivot(easywithlibrary)
3. Seriesofccw tests(withhelpofstack)
CS3233 CompetitiveProgramming,
StevenHalim,SoC,NUS
Geometry Basics 3D GeometryBasics 3D
3DObjects:
Sphere(veryrarelyused)
Greatcircledistance
Seebookforformulathisisnotthatpopular
CS3233 CompetitiveProgramming,
StevenHalim,SoC,NUS
Not Yet Covered This Sem NotYetCoveredThisSem
ThefamousPlaneSweepParadigm
Event,priority_queue
IntersectionProblems
1D 1D;2D 2D;3D 3D
DivideandConquerinGeometry
The closest pair problem Theclosestpairproblem
Bisectionmethodingeometryproblem
Geometric data structure (Segment/Fenwick Tree done Geometricdatastructure(Segment/FenwickTreedone,
OtherDSlikeQuadTree:notyet)
CS3233 CompetitiveProgramming,
StevenHalim,SoC,NUS