-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrarray.cpp
47 lines (45 loc) · 1.04 KB
/
rarray.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include<bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
using namespace std;
#define fi first
#define se second
#define ll long long
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define pii pair<int,int>
#define vi vector<int>
#define mii map<int,int>
#define pqb priority_queue<int>
#define pqs priority_queue<int,vi,greater<int> >
#define setbits(x) __builtin_popcountll(x)
#define mod 1000000007
#define inf 1e18
#define FastIO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
int main()
{
FastIO;
int n;
cin>>n;
ll sum =0;
vector<ll> arr;
for(int i=0;i<n;i++)
{
cin>>arr[i];
sum+=arr[i];
}
int q;
cin>>q;
vector<int> qu;
for(int j=0;j<q;j++)
{
cin>>qu[j];
}
for(int k=0;k<q;k++)
{
sum*=2;
cout<<sum<<"\n";
}
return 0;
}