| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1164273 | ChottuF | Intercastellar (JOI22_ho_t1) | C++20 | 251 ms | 5448 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int n;
cin >> n;
int arr[n];
int pref[n];
for (int i = 0; i<n; i++){
cin >> arr[i];
int num = 1;
while (arr[i] % 2 == 0){
arr[i] /= 2;
num *= 2;
}
pref[i] = num;
}
for (int i = 1; i<n; i++){
pref[i] += pref[i-1];
}
int q;
cin >> q;
while (q--){
int x;
cin >> x;
auto it = lower_bound(pref,pref+n,x) - pref;
cout << arr[it] << " ";
}
return 0;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
