摘要: ICPC2020上海 I ok ICPC2020昆明 I ok ICPC2019南京 K ok ICPC2019西安 ok ICPC2019徐州网络赛 ICPC2018南京 D ICPC2018沈阳 ICPC2017沈阳 C 最大空凸包 题解 ok 阅读全文
posted @ 2021-09-08 01:33 LaiYiC 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 圆与多边形的面积交 https://onlinejudge.u-aizu.ac.jp/courses/library/4/CGL/7/CGL_7_H int sgn(double x) { if(fabs(x)<eps)return 0; return x<0?-1:1; } struct Poin 阅读全文
posted @ 2021-09-15 22:55 LaiYiC 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 两个圆的切线与切点 https://onlinejudge.u-aizu.ac.jp/courses/library/4/CGL/7/CGL_7_G int sgn(double x) { if(fabs(x)<eps)return 0; return x<0?-1:1; } struct Poin 阅读全文
posted @ 2021-09-15 20:38 LaiYiC 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 点到圆的切点 https://onlinejudge.u-aizu.ac.jp/courses/library/4/CGL/7/CGL_7_F int sgn(double x) { if(fabs(x)<eps)return 0; return x<0?-1:1; } struct Point { 阅读全文
posted @ 2021-09-15 16:25 LaiYiC 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 两圆交点 https://onlinejudge.u-aizu.ac.jp/courses/library/4/CGL/7/CGL_7_E int sgn(double x) { if(fabs(x)<eps)return 0; return x<0?-1:1; } struct Point { / 阅读全文
posted @ 2021-09-15 12:43 LaiYiC 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 问n条平行于x,y的直线交点个数 https://onlinejudge.u-aizu.ac.jp/courses/library/4/CGL/6/CGL_6_A struct Line { int st,ed,pos; Line() {} Line(int a,int b,int c) { st= 阅读全文
posted @ 2021-09-14 20:31 LaiYiC 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 给一个逆时针的凸包和一条线,问你线的左边的和凸包的交面积 https://onlinejudge.u-aizu.ac.jp/courses/library/4/CGL/4/CGL_4_C int n; Point p[N],ch[N]; Point last[N]; //最后存在的点 //两直线交点 阅读全文
posted @ 2021-09-14 05:30 LaiYiC 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 7 计算几何 7.1 二维几何 // `计算几何模板` const double eps = 1e-8; const double inf = 1e20; const double pi = acos(-1.0); const int maxp = 1010; //`Compares a doubl 阅读全文
posted @ 2021-09-09 06:23 LaiYiC 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 2017icpc沈阳 http://acm.hdu.edu.cn/showproblem.php?pid=6219 const int N = 1e2+50; int sgn(double x) { //判断x是否等于0 if(fabs(x) < eps) return 0; else return 阅读全文
posted @ 2021-09-08 21:08 LaiYiC 阅读(39) 评论(0) 推荐(0) 编辑
摘要: [树链剖分]模板题 https://www.luogu.com.cn/problem/P3384 操作: 1 x y z (x,y)路径点权+z 2 x y 询问sum(x,y) 3 x z x的子树每个点+z 4 x 询问x的子树sum #define mid ((l+r)>>1) #define 阅读全文
posted @ 2021-09-07 17:31 LaiYiC 阅读(39) 评论(0) 推荐(0) 编辑