| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1350076 | guardianec | Intercastellar (JOI22_ho_t1) | C++20 | 515 ms | 589824 KiB |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
ll n;
cin >> n;
vector<ll> a(n);
for (int i=0; i<n; i++) {
cin >> a[i];
}
vector<ll> res;
for (int i=n-1; i>=0; i--) {
ll m = a[i];
ll k = 1;
while(m%2==0) {
m/=2;
k*=2;
}
while(k) {
k--;
res.push_back(m);
}
}
reverse(res.begin(), res.end());
ll q;
cin >> q;
while(q--) {
ll x;
cin >> x;
cout << res[x-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... | ||||
