| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 580984 | AngusWong | Intercastellar (JOI22_ho_t1) | C++17 | 457 ms | 9164 KiB |
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>
#define ll long long
using namespace std;
ll n, q, x, a[200001], cnt[200001];
int main() {
cin >> n;
for (int i=1; i<=n; i++){
cin >> a[i];
cnt[i]=1;
while (a[i]%2==0) a[i]/=2, cnt[i]*=2;
cnt[i]+=cnt[i-1];
}
cin >> q;
while (q--){
cin >> x;
ll p=lower_bound(cnt+1, cnt+n+1, x)-cnt;
cout << a[p] << "\n";
}
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
