This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
#define int long long
int n;int Q;
vector<int>ar;
signed main(){
cin>>n;
for(int i=1;i<=n;i++){
int v;
cin>>v;
int cnt=1;
while(v%2==0){
cnt++;v/=2;
}
for(int j=0;j<cnt;j++){
ar.push_back(v);
}
}
cin>>Q;
while(Q--){
int xi;
cin>>xi;
cout<<ar[xi-1]<<endl;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |