上一页 1 2 3 4 5 6 7 8 ··· 16 下一页
摘要: 丧心病狂的多项式乘法。。FFT模版题。。#include #include #include #include #include #include #include #include #define rep(i, l, r) for(int i=l; i=r; i--)#define cd comp... 阅读全文
posted @ 2015-05-05 16:00 NanoApe 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 凸包题。我们先把所有信用卡的四个定点的坐标求出来,然后计算凸包长度,最后加上一个圆的周长就行。#include #include #include #include #include #include #include #define rep(i, l, r) for(int i=l; il=t->... 阅读全文
posted @ 2015-05-05 15:43 NanoApe 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 树状数组套权值线段树,然后对于每个询问进行二分答案。#include #include #include #include #include #include #include #define rep(i, l, r) for(int i=l; i>1; if (k>1; if (s(l(y))-... 阅读全文
posted @ 2015-05-05 15:41 NanoApe 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 数据结构模版题【连这么神的题都沦为模版题了Orz对数离散化后树状数组套权值线段树。#include #include #include #include #include #include #include #define rep(i, l, r) for(int i=l; il=t->r=blan... 阅读全文
posted @ 2015-05-05 15:38 NanoApe 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 欧拉回路。把每个数当作一个节点,能首尾相连的就连接一条有向边。然后从起点跑一遍就行。#include #include #include #include #include #include using namespace std;#define rep(i, l, r) for(int i=l; ... 阅读全文
posted @ 2015-05-05 15:34 NanoApe 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 同样是道可并堆题。配对堆模版题。#include #include #include #include #include #include #define rep(i, l, r) for(int i=l; i<=r; i++)#define clr(x, c) memset(x, c, sizeo... 阅读全文
posted @ 2015-05-05 15:32 NanoApe 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 最短路+堆优化。普通的堆还不行,自己用的是配对堆(貌似斐波那契堆也行?毕竟理论复杂度)然后发现自己的配对堆比云神的不知快了多少。。。我照着他的模版打的喂。。然后发现前T条边不理都能A。。。数据啊数据233#include #include #include #include #include #in... 阅读全文
posted @ 2015-05-05 15:21 NanoApe 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 随着期中考的过去,竞赛准备也进入了最后的倒计时了。。。可蒟蒻还在复习。。不对是学数据结构。。。哦不。。。想想庄神已经因为GDOI停课两星期了。。。刷题无数。。。可金中的环境,连Greens去参加NOI也只能停课一星期。。。看来只能好好利用晚自修的时间了呢。。。这个星期赶紧把数据结构最难最难的部分解决... 阅读全文
posted @ 2015-04-21 20:25 NanoApe 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 这道题为树套树,我自己是替罪羊树套权值线段树。此题有三种操作:1.询问K值:可通过替罪羊树提取区间+权值线段树合并+二分答案求得2.修改:可通过权值线段树的删除+添加操作实现3.插入:可通过替罪羊树的插入操作实现#include #include #include #include #include... 阅读全文
posted @ 2015-04-21 20:20 NanoApe 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 一道BST的练习题。Treap版:#include #include #include #include #include #include #define rep(i, l, r) for(int i=l; i pr[v]) Right(v); } else { Insert(x, r[v])... 阅读全文
posted @ 2015-04-21 20:16 NanoApe 阅读(138) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 16 下一页
AmazingCounters.com