#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;
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Incorrect |
93 ms |
4408 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 11 |
7 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Incorrect |
93 ms |
4408 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |