个人记录线段树~ #include<bits/stdc++.h> #define int long long #define endl '\n' using namespace std; int a[100005]; int b[400005]; int tree[400005]; int l…