上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 73 下一页
摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1043 求出每个圆没被覆盖的长度即可; 特判包含和相离的情况,注意判包含时 i 包含 j 和 j 包含 i 是不同的情况; 然后考虑相交,可以算出被覆盖的那段圆弧所对的圆心角,用一个 [0,2π 阅读全文
posted @ 2018-12-19 18:07 Zinn 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1670 单调栈维护凸包即可,用叉积判断; 维护上凸壳,然后把所有点的纵坐标翻转再求上凸壳即可,要注意排序规则略有变化。 代码如下: 阅读全文
posted @ 2018-12-19 16:49 Zinn 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2178 先看到这篇博客:https://www.cnblogs.com/heisenberg-/p/6740654.html 好像本应算弓形面积、三角形面积之类的,但不会...于是用辛普森积分硬 阅读全文
posted @ 2018-12-19 13:21 Zinn 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1724 函数都给出来了,可以用辛普森积分; 一开始 eps = 1e-8 TLE了,答案只要三位小数,那么 eps = 1e-5 即可; 这次用了比较标准的写法^_^ 代码如下: 阅读全文
posted @ 2018-12-19 09:50 Zinn 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.luogu.org/problemnew/show/P4525 https://www.luogu.org/problemnew/show/P4526 学习辛普森积分:https://blog.csdn.net/VictoryCzt/article/details/80 阅读全文
posted @ 2018-12-19 09:24 Zinn 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4530 用LCT维护子树 size,就是实边和虚边分开维护; 看博客:https://blog.csdn.net/neither_nor/article/details/52979425 代码如 阅读全文
posted @ 2018-12-18 21:41 Zinn 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=3083 换根后路径还是不变,子树分类讨论一下,树剖后线段树维护即可。 代码如下: 阅读全文
posted @ 2018-12-18 11:38 Zinn 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 题目:http://codeforces.com/contest/360/problem/E 首先,每条边不是选 \( l[i] \) 就是选 \( r[i] \); 做法就是先把边权都设成 \( r[i] \),然后做 \( dijkstra \),如果有一条可改的边 \( (a,b) \) 而且 阅读全文
posted @ 2018-12-18 10:27 Zinn 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2632 官方题解:http://neerc.ifmo.ru/archive/2011/neerc-2011-analysis.pdf 但还是不懂; 如果猜1是最坏情况,那么其它数怎么用更少的次数 阅读全文
posted @ 2018-12-18 09:31 Zinn 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1927 首先注意到这是个DAG; 考虑每个点从哪里来,可以是瞬移来的,也可以是从某个点走过来的,而从每个点走出去只能用一次; 所以拆点,i 表示从这个点走出去,n+i 表示来到这个点; 建图: 阅读全文
posted @ 2018-12-18 00:26 Zinn 阅读(140) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 73 下一页