摘要: 1 #include 2 #include 3 using namespace std; 4 struct node{ 5 node *left; 6 node *right; 7 int height; 8 int data; 9 node(int x):data(x),left(NULL),right(NULL),height(0){} 10 }; 11 struct avl 12 { 13 node* root; 14 int Height(node *NODE) { 15 if(NODE==NULL) return -1; ... 阅读全文
posted @ 2013-12-17 19:26 sooflow 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 第一种方法 标记一下开始和结束时间 然后扫一遍 就能得出答案了#include#includeconst int maxn=1000000+5;int vis[maxn];int main(){ int n,x,y; scanf("%d",&n); memset(vis,0,sizeof(vis)); int up=0; for(int i=0;iup) up=y; vis[x]++; vis[y]--; } int ans1=0,ans2=0; int cur=0,cnt1=0,cnt2=0; bool st... 阅读全文
posted @ 2013-12-17 19:23 sooflow 阅读(450) 评论(0) 推荐(0) 编辑