上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 84 下一页

2018年12月19日

bzoj 2178 圆的面积并——辛普森积分

摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2178 把包含的圆去掉。横坐标不相交的一段一段圆分开算。算辛普森的时候预处理 f( ) ,比如把自己的 f( l ) 和 f( r ) 从上一层传进来之类的,能少算很多次。 阅读全文

posted @ 2018-12-19 14:31 Narh 阅读(236) 评论(0) 推荐(0) 编辑

hdu 1724 Ellipse——辛普森积分

摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1724 阅读全文

posted @ 2018-12-19 10:54 Narh 阅读(131) 评论(0) 推荐(0) 编辑

洛谷 4525 && 洛谷 4526 【模板】自适应辛普森法

摘要: 题目:https://www.luogu.org/problemnew/show/P4525 https://www.luogu.org/problemnew/show/P4526 参考:https://blog.csdn.net/VictoryCzt/article/details/8066011 阅读全文

posted @ 2018-12-19 10:05 Narh 阅读(237) 评论(0) 推荐(0) 编辑

2018年12月18日

bzoj 4530 [Bjoi2014]大融合——LCT维护子树信息

摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4530 LCT维护子树 siz 。设 sm[ ] 表示轻儿子的 siz 和+1(1是自己的siz),siz[ ] 表示 splay 里 ( 两个儿子的 siz[ ] ) + sm[ cr ] 。 阅读全文

posted @ 2018-12-18 22:00 Narh 阅读(133) 评论(0) 推荐(0) 编辑

bzoj 3083 遥远的国度——树链剖分+线段树维护子树信息

摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=3083 int 的范围是 2^31 - 1 ,所以权值是不是爆 int 了…… O( nlog2n ) 也能过? 阅读全文

posted @ 2018-12-18 11:33 Narh 阅读(207) 评论(0) 推荐(0) 编辑

CF 360E Levko and Game——贪心

摘要: 题目:http://codeforces.com/contest/360/problem/E 官方题解与证明:http://codeforces.com/blog/entry/9529 一条可以调整的边的边权要么是 l [ i ] 要么是 r[ i ] 。 先把所有可调整边设成 r[ i ] ,然后 阅读全文

posted @ 2018-12-18 10:29 Narh 阅读(284) 评论(0) 推荐(0) 编辑

bzoj 2632 [neerc2011]Gcd guessing game——贪心(存疑)

摘要: 题目: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:20 Narh 阅读(201) 评论(0) 推荐(0) 编辑

bzoj 3779 重组病毒——LCT维护子树信息

摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=3779 调了很久……已经懒得写题解了。https://www.cnblogs.com/Zinn/p/10124183.html 线段树和LCT是分开的。线段树的子树一直是相对于 1 号点而言。线 阅读全文

posted @ 2018-12-18 00:34 Narh 阅读(158) 评论(0) 推荐(0) 编辑

2018年12月17日

bzoj 4010 [HNOI2015]菜肴制作——贪心

摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4010 和 bzoj 2535 差不多。因为当前怎么决策与该点后面连的点的标号情况有关,所以按倒着的拓扑序决策。 [HNOI2015]菜肴制作 阅读全文

posted @ 2018-12-17 23:53 Narh 阅读(151) 评论(0) 推荐(0) 编辑

bzoj 2535 && bzoj 2109 [Noi2010]Plane 航空管制——贪心

摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2535 https://www.lydsy.com/JudgeOnline/problem.php?id=2109 考虑按拓扑序决策,发现不太行;主要是一种情况:虽然自己的 k[ ] 靠后,但自 阅读全文

posted @ 2018-12-17 23:26 Narh 阅读(147) 评论(0) 推荐(0) 编辑

上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 84 下一页

导航