| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1168451 | lxz20071231 | Intercastellar (JOI22_ho_t1) | C++20 | 35 ms | 6980 KiB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 200005;
ll sz[N], l[N], a[N];
int main () {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, q;
cin >> n;
for (int i=1; i<=n; i++){
cin >> a[i];
sz[i] = a[i] & -a[i];
l[i] = a[i] / sz[i];
}
ll passed = 0;
int ind = 1;
cin >> q;
while (q--){
ll x; cin >> x;
while (passed + sz[ind] < x){
passed += sz[ind];
ind++;
}
cout << l[ind] << '\n';
}
return 0;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
