2013年5月12日

hdu 2795 Billboard 线段树 单点更新

摘要: BillboardTime Limit: 20000/8000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6525Accepted Submission(s): 2957Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is the 阅读全文

posted @ 2013-05-12 20:01 电子幼体 阅读(116) 评论(0) 推荐(0) 编辑

线段树模板

摘要: 单点更新,区间求最值#include #include #include #include #include #define N 222222 using namespace std; int num[N]; struct Tree { int l; int r; int max; } tree[N*4]; void push_up(int root) { tree[root].max=max(tree[root=tree[root].r) return tree[root].max; int mid=(tree[root].l+... 阅读全文

posted @ 2013-05-12 19:03 电子幼体 阅读(188) 评论(0) 推荐(0) 编辑

[置顶] ⑨的线段树专题

摘要: 单点更新最最基础的线段树,只更新叶子节点,然后把信息用PushUP(int r)这个函数更新上来。hdu1166 敌兵布阵线段树 hdu 1166 敌兵布阵 单点更新区间求和hdu1754 I Hate It线段树 hdu 1754 I Hate It 单点更新 区间求最值hdu1394 Minimum Inversion Numberhdu 1394 Minimum Inversion Number 线段树 逆序数hdu2795 Billboardhdu 2795 Billboard 线段树 单点更新UVa 12299 - RMQ with Shifts 线段树 单点更新poj2828Buy 阅读全文

posted @ 2013-05-12 17:33 电子幼体 阅读(172) 评论(0) 推荐(0) 编辑

【专题】线段树

摘要: 单点更新最最基础的线段树,只更新叶子节点,然后把信息用PushUP(int r)这个函数更新上来。hdu1166 敌兵布阵线段树 hdu 1166 敌兵布阵 单点更新区间求和hdu1754 I Hate It线段树 hdu 1754 I Hate It 单点更新 区间求最值hdu1394 Minimum Inversion Numberhdu 1394 Minimum Inversion Number 线段树 逆序数hdu2795 Billboardhdu 2795 Billboard 线段树 单点更新UVa 12299 - RMQ with Shifts 线段树 单点更新poj2828Buy 阅读全文

posted @ 2013-05-12 17:33 电子幼体 阅读(132) 评论(0) 推荐(0) 编辑

导航