Submission #952349

#TimeUsernameProblemLanguageResultExecution timeMemory
952349abczzIntercastellar (JOI22_ho_t1)C++14
35 / 100
27 ms7680 KiB
#include <iostream> #include <vector> #include <queue> #include <algorithm> #include <map> #define ll long long using namespace std; map <ll, ll> mp; ll n, q, k, f, s, A[100000]; int main() { cin >> n; for (int i=0; i<n; ++i) { cin >> A[i]; k = 1; while (!(A[i] & 1)) { A[i] /= 2; k *= 2; } s += k; mp[s] = A[i]; } cin >> q; while (q--) { cin >> k; cout << mp.lower_bound(k)->second << '\n'; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...