| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 642737 | kdn5549 | Intercastellar (JOI22_ho_t1) | C++17 | 2087 ms | 6544 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
#define eb emplace_back
#define all(v) v.begin(),v.end()
#define ff first
#define ss second
const ll mxn=2e5+5;
ll a[mxn];
vector<pl> vt;
int main()
{
ios::sync_with_stdio(0); cin.tie(0);
ll n; cin>>n;
for (int i=1;i<=n;i++)
{
cin>>a[i];
ll cnt=1;
while (a[i]%2==0)
{
a[i]/=2;
cnt*=2;
}
vt.eb(a[i],cnt);
}
ll q; cin>>q;
while (q--)
{
ll x; cin>>x;
ll c=0,pos=0;
while (c<n and pos+vt[c].ss<x)
{
pos+=vt[c].ss;
c++;
}
cout<<vt[c].ff<<'\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... | ||||
