| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1195527 | jesusarg | Intercastellar (JOI22_ho_t1) | C++17 | 249 ms | 5428 KiB |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
int n;
cin>>n;
vector<ll> tree(n,0), v(n);
for(int i = 0; i < n; i++){
cin >> v[i];
ll val=__builtin_ctzll(v[i]);
v[i]>>=val;
if(i==0){
tree[i]=(1LL<<val);
}else{
tree[i]=tree[i-1]+(1LL<<val);
}
}
int q;
cin >> q;
while(q--){
ll a;
cin >> a;
cout << v[lower_bound(tree.begin(),tree.end(),a)-tree.begin()] << '\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... | ||||
