Submission #952350

#TimeUsernameProblemLanguageResultExecution timeMemory
952350abczzIntercastellar (JOI22_ho_t1)C++14
100 / 100
464 ms20528 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[200000]; 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...