Submission #994179

#TimeUsernameProblemLanguageResultExecution timeMemory
994179faqinyeagerIntercastellar (JOI22_ho_t1)C++17
0 / 100
27 ms3932 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ int n; cin >> n; vector<ll> a(n), pow(n, 1); for(int i = 0; i < n; i++){ cin >> a[i]; while(a[i] % 2 == 0){ a[i] /= 2; pow[i] *= 2; } } int Q, id = 0; cin >> Q; while(Q--){ int c, tmp = 0; cin >> c; while(c > tmp + pow[id]){ tmp += pow[id]; id += 1; } if(id < n) cout << a[id] << '\n'; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...