| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1325068 | zwezdinv | Intercastellar (JOI22_ho_t1) | C++20 | 53 ms | 5348 KiB |
#include<bits/stdc++.h>
using ll = long long;
signed main() {
std::cin.tie(nullptr)->sync_with_stdio(false);
int n;
std::cin >> n;
std::vector<ll> a(n);
std::vector<ll> pref(n + 1);
for (auto& i : a) std::cin >> i;
for (int i = 0; i < n; ++i) {
int k = __builtin_ctzll(a[i]);
a[i] >>= k;
pref[i + 1] = pref[i] + (1ll << k);
}
int q;
std::cin >> q;
while (q--) {
ll x;
std::cin >> x;
int k = std::lower_bound(pref.begin(), pref.end(), x) - pref.begin();
std::cout << a[k - 1] << '\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... | ||||
