Interval Tree
黯淡蓝点
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ - 1195 - Mobile phones
#includeusing namespace std;#define MY_MAX 1100int Tree[MY_MAX*3][MY_MAX*3];int S;void Add_x(int rooty,int rootx,int L,int R,int x,int a){ Tree[rooty][rootx]+=a; if(L==R)return; int转载 2012-09-20 22:03:29 · 294 阅读 · 0 评论 -
POJ - 2528 - Mayor's posters
#include#include#includeusing namespace std;int n;struct CPost{ int L,R;};CPost posters[10100];int x[20200];//海报的端点瓷砖编号 int hash[10000010];//hash[i]表示瓷砖i所处的离散化后的区间编号 struct CNode{ in转载 2012-09-20 22:04:42 · 708 阅读 · 0 评论 -
POJ - 3321 - Apple Tree
#include#includeusing namespace std;#define MY_MAX 220000int C[MY_MAX];typedef vector VCT_INT;vectorG(MY_MAX/2);int Lowbit[MY_MAX];bool HasApple[MY_MAX/2];int Start[MY_MAX];int End[MY_MAX];转载 2012-09-20 22:06:23 · 302 阅读 · 0 评论 -
POJ - 3468 - A Simple Problem with Integers
#includeusing namespace std;struct CNode{ int L,R; CNode *pLeft,*pRight; long long nSum; long long Inc;};CNode Tree[1000000];int nCount=0;int Mid(CNode *pRoot){ return (pRo转载 2012-09-20 22:06:57 · 270 阅读 · 0 评论 -
POJ - 1151 - Atlantis
#include#include#include#includeusing namespace std;double y[210];struct CNode{ int L,R; CNode *pLeft,*pRight; double Len; int Covers;};CNode Tree[1000];struct CLine{ do转载 2012-09-20 22:02:18 · 284 阅读 · 0 评论
分享