码迷,mamicode.com
首页 >  
搜索关键字:zoj 线段树    ( 12657个结果
ZOJ 3705 Applications 模拟
#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#includ...
分类:移动开发   时间:2014-05-08 19:33:18    阅读次数:493
zoj 1806 This Takes the Cake 计算凸四边形和三角形的面积
题目来源:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=806题意:凸四边形上 有8个点, 4个顶点 , 和 每2个顶点的中点。经过这8个点的每一条线段,将四边形分成2份, 求这两份面积最近的面积。分析: 枚举, 每条线段, 计...
分类:其他好文   时间:2014-05-08 18:44:03    阅读次数:284
ZOJ 2314 带上下界的可行流
对于无源汇问题,方法有两种. 1 从边的角度来处理. 新建超级源汇, 对于每一条有下界的边,x->y, 建立有向边 超级源->y ,容量为x->y下界,建立有向边 x-> 超级汇,容量为x->y下界.建立有向边 x->y,容量为x->y的上界减下界. 2 从点的角度来处理. 新建超级源汇,对于每个点...
分类:其他好文   时间:2014-05-08 15:18:48    阅读次数:306
zoj 1608 Two Circles and a Rectangle 判断两个圆是否能放入一个矩形中
题目来源:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=608分析:两个圆放到矩形的临界点图为:其中a为长, b为宽, r1 > r2红色三角形的三边长分别为:x = a - (r1 +r2)y = b - (r1 + r2)z...
分类:其他好文   时间:2014-05-08 14:17:58    阅读次数:377
Wikioi 1081 线段树练习2
线段树练习飘逸的写法,自从自己改成这种写法之后,线段树就没再练过,现在终于练得上了。 因为这里查询只是查询了叶子结点,所以pushUp函数就用不上了,不过我没去掉之前是3ms,去掉之后反而变成4ms了,搞不懂怎么原因,没用到,去掉之后应该更快才对啊,竟然变慢了,真搞不明白? #include #include #include #include #include #include ...
分类:其他好文   时间:2014-05-08 05:50:29    阅读次数:240
[计算几何] zoj 3728 Collision
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3728 题目意思: 给一个以原点(0,0)为圆 Collision Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge There's a r...
分类:其他好文   时间:2014-05-08 03:55:33    阅读次数:417
[dfs] zoj 3736 Pocket Cube
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3736 Pocket Cube Time Limit: 2 Seconds      Memory Limit: 65536 KB Pocket Cube is a 3-D combination puzzle. It is a 2 ×...
分类:其他好文   时间:2014-05-07 23:53:24    阅读次数:709
SPOJ GSS3 Can you answer these queries III (线段树)
题目大意: 求区间最大子区间的和。 思路分析: 记录左最大,右最大,区间最大。 注意Q_L  和 Q_R  就好。 #include #include #include #include #define lson num<<1,s,mid #define rson num<<1|1,mid+1,e #define maxn 55555 using ...
分类:其他好文   时间:2014-05-07 12:36:16    阅读次数:379
【线段树】HDU 1394 Minimum Inversion Number
minimum inversion number:最小逆序数Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(...
分类:其他好文   时间:2014-05-07 00:43:39    阅读次数:469
zoj Treasure Hunt IV
Treasure Hunt IVTime Limit:2 Seconds Memory Limit:65536 KBAlice is exploring the wonderland, suddenly she fell into a hole, when she woke up, she foun...
分类:其他好文   时间:2014-05-06 18:08:39    阅读次数:290
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!