| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1128202 | yumemystery | Intercastellar (JOI22_ho_t1) | C++20 | 1108 ms | 589824 KiB |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector <int> castella;
for (int i=0; i<n; i++) {
int len;
cin >> len;
if (len%2!=0) castella.push_back(len);
else {
int tmp=len;
while (tmp%2==0) {
tmp/=2;
}
for (int i=1; i<=len/tmp; i++) {
castella.push_back(tmp);
}
}
}
int Q;
cin >> Q;
for (int i=0; i<Q; i++) {
int search;
cin >> search;
cout << castella[search-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... | ||||
