In given question : " ARRROOT"

I think most of the users are able to crack the logic (for each query answer will be double of previous sum for explaination see editorial ) , but main thing is that why WA

Because array contains negative values too , and we are just printing Negative sum % (10**9 +7) which will be -ve

for negative values modulus will be calculated as (-ve value + mod ) %mod

```
#define mod 1000000007
ll modadd(ll a, ll b,ll MOD = mod){
return((a%MOD)+(b%MOD)+MOD)%MOD;
}
ll modsub(ll a, ll b,ll MOD = mod){
return((a%MOD) - (b%MOD) + MOD)%MOD;
}
loop(ii,tt)
{
lli n;
cin>>n;
lli a[n];
scanarr(a,n);
lli sum=0;
loop(i,n)
sum=modadd(sum , a[i]);
lli q;
cin>>q;
while(q--)
{
lli x;
cin>>x;
sum = modadd(sum,sum);
print(sum);
}
}
```