| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 526417 | benson1029 | Intercastellar (JOI22_ho_t1) | C++14 | 329 ms | 4532 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
int n;
int a[200005]; long long psum[200005];
int q; long long x;
int main() {
ios::sync_with_stdio(false);
cin >> n;
for(int i=1; i<=n; i++) cin >> a[i];
for(int i=1; i<=n; i++) {
psum[i] = psum[i-1];
int tmp = a[i];
while(a[i]%2==0) {
a[i]/=2;
}
psum[i] += tmp/a[i];
}
cin >> q;
while(q--) {
cin >> x;
int tmp = lower_bound(psum+1, psum+n+1, x)-psum;
cout << a[tmp] << "\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... | ||||
