제출 #836621

#제출 시각아이디문제언어결과실행 시간메모리
83662112345678Intercastellar (JOI22_ho_t1)C++17
100 / 100
54 ms10772 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long const int nx=2e5+5; ll n, q, a[nx], l[nx], x, qs[nx], c=1; int main() { cin.tie(NULL)->sync_with_stdio(false); cin>>n; for (int i=1; i<=n; i++) cin>>l[i], a[i]=l[i]&-l[i], qs[i]=qs[i-1]+a[i]; cin>>q; while (q--) { cin>>x; while (x>qs[c]) c++; cout<<l[c]/a[c]<<'\n'; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...