| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 624436 | QwertyPi | Intercastellar (JOI22_ho_t1) | C++14 | 471 ms | 9196 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 2e5 + 13;
int l[N], x[N];
int32_t main(){
int n;
cin >> n;
for(int i = 0; i < n; i++){
int v; cin >> v;
int d = 0;
while(v % 2 == 0) d++, v /= 2;
l[i + 1] = 1LL << d;
x[i + 1] = v;
}
for(int i = 0; i < n; i++){
l[i + 1] += l[i];
}
int q;
cin >> q;
for(int i = 0; i < q; i++){
int y;
cin >> y;
int idx = lower_bound(l, l + n + 1, y) - l;
cout << x[idx] << 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... | ||||
