摘要:
有N个位置,M个操作。操作有两种,每次操作是: 1 a b c:表示在第a个位置到第b个位置,每个位置加上一个数c 2 a b c:表示询问从第a个位置到第b个位置,第C大的数是多少。 算法见注释 cpp include define int long long using namespace st 阅读全文
posted @ 2019-06-09 13:59
Sshwy
阅读(113)
评论(0)
推荐(0)
摘要:
按时间继承关系建立主席树(权值线段树) 线段树维护区间和、元素个数 cpp include include define int long long using namespace std; const int N=1e5+5; const int SZ=5e6+6; int m,n; int to 阅读全文
posted @ 2019-06-09 11:19
Sshwy
阅读(93)
评论(0)
推荐(0)

浙公网安备 33010602011771号