摘要:
难得写一道线段树,先上代码.....#include<cstdio>
#include<cstring>
#include<iostream>
using namespace std; #define MAXN 50002
struct node{ int l, mid, r; char ch; int v; char ll[2], rr[2]; int num; } a[MAXN*4];
int n, m; void pushup(int e)
{ a[e].v=a[e<<1].v+a[e<<1|1].v; a[e].num=a[e 阅读全文