第4题,离散化后权值线段树。 #define IO std::ios::sync_with_stdio(0),cin.tie(0),cout.tie(0) #define bug(x) cout<<#x<<" is "<<x<<endl #include<bits/stdc++.h> typedef long long ll; using namespace std; #define rs o * 2 + 1 #define ls o * 2 const int N = 2e5 + 5; const int mod...