| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1196124 | CELD_07 | Intercastellar (JOI22_ho_t1) | C++20 | 229 ms | 5928 KiB |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll r(ll b){
for(int i=60; i>=0; i--)if(b%(1LL<<i)==0)return (1LL<<i);
}
inline void solve(){
ll a, b, c, d, e;
cin>>a;
vector<pair<ll, ll>> v;
v.push_back({0, 0});
for(int i=0; i<a; i++){
cin>>b;
v.push_back({v.back().first+r(b), b/r(b)});
}
//for(int i=0; i<v.size(); i++)cout<<v[i].first<<" "<<v[i].second<<endl;
cin>>b;
for(int i=0; i<b; i++){
cin>>c;
auto p=*lower_bound(v.begin(), v.end(), make_pair(c, 0*1LL));
cout<<p.second<<endl;
}
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
solve();
}컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
