复杂度 Q ∗ l o g ( N ) ∗ l o g ( M ) Q*log(N)*log(M) Q∗log(N)∗log(M) #include<bits/stdc++.h> using namespace std; typedef long long ll; #define debug printf("---\n"); const int N=2050,M=10010; #define int long long int t1[N][N],t2[N][N],t3[N][N],t4[N][N]; int n,m; int lowbit(int x) {...