P3224 [HNOI2012]永无乡(线段树合并 时间复杂度 nlogn)
#include <bits/stdc++.h>using namespace std;const int maxn = 30000005;int tree[maxn],lc[maxn],rc[maxn],tot,sum[maxn];void push_up( int x ){ tree[x] = max( tree[ lc[x] ],tree[rc[x] ] );...
原创
2019-09-15 11:47:10 ·
189 阅读 ·
1 评论