考虑计算贡献
#include<bits/stdc++.h>
using namespace std;
vector<int>v[300010];
#define int long long
int res=0;
const int mod=1e9+7;
vector<int>tmp;
int qmi(int a,int b)
{
int res=1;
while(b)
{
if(b&1) res=res*a%mod;
b>>=1;
a=a*a%mod;
}
return res;
}
int n;
int rt;
int tr[300010];
int lowbit(int x)
{
return x&