| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1196393 | buraphon_numberone | Intercastellar (JOI22_ho_t1) | C++20 | 702 ms | 589824 KiB |
#include <bits/stdc++.h>
using namespace std;
using vll = vector<long long>;
int main()
{
cin.tie(nullptr); ios::sync_with_stdio(false);
int n;
cin >> n;
vector<long long> a(n);
for(int i=0; i<n; i++)
{
cin >> a[i];
}
vll nn;
for(int i=0; i<n; i++)
{
int x = a[i];
int count = 1;
while(x %2 == 0)
{
x/=2;
count++;
}
for(int j=0; j<a[i]/x; j++)
{
nn.push_back(x);
}
}
// for(auto &a: nn)
// {
// cout << a << " ";
// }
// cout << " ";
int q;
cin >> q;
while(q--)
{
int qi;
cin >> qi;
cout << nn[qi-1] << '\n';
}
return (0);
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
