数据结构-线段树|树状数组
wonderzy
这个作者很懒,什么都没留下…
展开
-
poj2104||hdu2665 归并树|划分树
#include #include #include #include #include #define maxn 100010 using namespace std; int n,m; int s[maxn]; struct tree{ int l,r; }a[maxn*3]; int lsum[20][maxn],t[20][maxn]; void build(int l,原创 2014-06-16 20:25:58 · 733 阅读 · 0 评论 -
ZOJ3800 GCD+离线线段树
Calculation Time Limit: 5 Seconds Memory Limit: 262144 KB You are given a sequence {A0, A1, ..., AN-1} and an integer set called GS. Defined a function called G(L, R) on A, where G(L, R原创 2014-09-07 00:17:51 · 1028 阅读 · 0 评论 -
ZOJ 3813 Alternating Sum 树状数组
Alternating Sum Time Limit: 2 Seconds Memory Limit: 65536 KB There is a digit string S with infinite length. In addition, S is periodic and it can be formed by concatenating infinite re原创 2014-09-09 23:37:02 · 1146 阅读 · 1 评论