摘要: #include #include const int MAXN = 200005;typedef struct { int l; int r; int max;}Node;Node seg[MAXN * 4];int Max;int fmax(int x,int y){ return x > y ? x : y;}void build(int num,int l,int r){ seg[num].l = l; seg[num].r = r; seg[num].max = -1; if ( l == r ) return; i... 阅读全文
posted @ 2013-06-22 19:43 Sinker 阅读(149) 评论(0) 推荐(0) 编辑
摘要: #include #include const int MAXN = 100005;typedef struct { int cnt; int l; int r;}Node;Node seg[3 * MAXN];int ans[MAXN];void build(int idx,int l,int r){ seg[idx].l = l; seg[idx].r = r; seg[idx].cnt = 0; if ( l == r ) return; int mid = ( l + r ) >> 1; build(idx > 1; ... 阅读全文
posted @ 2013-06-22 17:21 Sinker 阅读(240) 评论(0) 推荐(0) 编辑