2012年6月21日
摘要: 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 using namespace std; 5 #define MAXN 50010 6 struct time 7 { 8 int s,t,ef; 9 friend bool operator<(time a,time b)10 {11 return a.ef>b.ef;12 }13 };14 struct node15 {16 int sum,lazy;17 };18 time p[MAXN*10];19 no... 阅读全文
posted @ 2012-06-21 13:55 DrunBee 阅读(482) 评论(1) 推荐(0)
摘要: 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 #define MAXN 500010 5 using namespace std; 6 int x[MAXN]; 7 bool vis[MAXN]; 8 struct cmd 9 { 10 char s[6]; 11 int val; 12 }; 13 struct node 14 { 15 int left,right,val; 16 }; 17 node tree[MAXN<<2]; 18 cmd p[MAXN]; 阅读全文
posted @ 2012-06-21 13:24 DrunBee 阅读(405) 评论(0) 推荐(0)
摘要: 1 #include<cstdio> 2 #include<algorithm> 3 using namespace std; 4 #define MAXN 10010 5 int tree[MAXN<<2],ca=1; 6 inline void PushUp(int rt) 7 { 8 tree[rt]=min(tree[rt<<1],tree[rt<<1|1]); 9 }10 void Build(int L,int R,int rt)11 {12 if(L==R)13 scanf("%d",&tre 阅读全文
posted @ 2012-06-21 11:02 DrunBee 阅读(364) 评论(1) 推荐(0)