会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
vactor
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
14
15
16
17
18
19
20
21
下一页
2014年11月17日
hdu-2871
摘要: #include#include#include#include#include#include#define lson l,m,rts;set::iterator itr;void pushUp(int rt,int m){ rsum[rt]=rsum[rt>1))) lsum...
阅读全文
posted @ 2014-11-17 14:57 JarvisLau
阅读(190)
评论(0)
推荐(0)
2014年11月16日
cpc,tank
摘要: 先保存一段错误的代码#include#include#include#include#define lson l,m,rt>1; build(lson); build(rson); pushUp(rt);}void update(int w,int L,int R,int l,in...
阅读全文
posted @ 2014-11-16 19:09 JarvisLau
阅读(133)
评论(0)
推荐(0)
2014年11月14日
hdu_2871
摘要: #include#include#include#include#include#include#define lson r,m,rt>1)) lsum[rt]=lsum[rt]+lsum[rt>1) rsum[rt]=rsum[rt]+rsum[rt>1; bui...
阅读全文
posted @ 2014-11-14 09:42 JarvisLau
阅读(251)
评论(0)
推荐(0)
2014年11月11日
cpc,a wonderful concert
摘要: 做完这道题突然就感觉自己脑子是不是已经秀逗了,tle到死后才想起来找规律, 就是求排列数的题目,按插入点对状态进行分类,可以暴力tle。。。#include#include#includeusing namespace std;int main(){ int a[1111][1111];...
阅读全文
posted @ 2014-11-11 21:00 JarvisLau
阅读(116)
评论(0)
推荐(0)
2014年11月6日
hdu_3308 区间合并
摘要: 一两个月没写代码的确是手生的厉害,debug的好艰辛,,不过看到accept时的那种满足感真的就是爽#include#include#include#include#define lson l,m,rt>1)&&lnum[rtrnum[rt>1&&lnum[rtrnum[rt>1; build...
阅读全文
posted @ 2014-11-06 19:59 JarvisLau
阅读(165)
评论(0)
推荐(0)
2014年11月2日
poj_3667线段树区间合并
摘要: 对照着notonlysuccess大牛的代码写的#include#include#include#include#define lson l,m,rt>1; build(lson); build(rson);}void pushUp(int rt,int m){ lsum[rt]=...
阅读全文
posted @ 2014-11-02 19:51 JarvisLau
阅读(199)
评论(0)
推荐(0)
poj_2777线段树+位运算
摘要: 第一次没想到用位运算,不出意料的T了,,,PS:在床上呆了接近两个月后,我胡汉三又杀回来刷题啦~~#include#include#include#include#define lson l,m,rt=L&&R>=r) { sum[rt]=c; col[rt]=1r...
阅读全文
posted @ 2014-11-02 12:22 JarvisLau
阅读(162)
评论(0)
推荐(0)
2014年9月13日
poj_3468,线段树成段更新
摘要: 参考自http://www.notonlysuccess.com/index.php/segment-tree-complete/#include#include#include#include#define lson l,m,rt>1)); sum[rt>1); col...
阅读全文
posted @ 2014-09-13 20:52 JarvisLau
阅读(131)
评论(0)
推荐(0)
2014年9月12日
hdu_2795,线段树,单点更新
摘要: #include#include#include#define lson l,m,rt>1; build(lson); build(rson);}int query(int d,int l,int r,int rt){ int ret=-1; if(l==r) { ...
阅读全文
posted @ 2014-09-12 07:43 JarvisLau
阅读(108)
评论(0)
推荐(0)
2014年9月11日
hdu_1394,线段树求逆序数
摘要: http://www.notonlysuccess.com/index.php/segment-tree-complete/#include#include#include#include#define lson l,m,rt>1; build(lson); build(rson);}v...
阅读全文
posted @ 2014-09-11 20:02 JarvisLau
阅读(163)
评论(0)
推荐(0)
上一页
1
···
14
15
16
17
18
19
20
21
下一页
公告