| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 802033 | acatmeowmeow | Intercastellar (JOI22_ho_t1) | C++11 | 65 ms | 8184 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 2e5;
int n, q, arr[N + 5], b[N + 5];
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> arr[i];
b[i] = 1;
while (arr[i] % 2 == 0) b[i] *= 2, arr[i] /= 2;
b[i] += b[i - 1];
}
cin >> q;
while (q--) {
int x;
cin >> x;
int index = lower_bound(b + 1, b + n + 1, x) - (b + 1) + 1;
cout << arr[index] << '\n';
}
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... | ||||
