Submission #881941

#TimeUsernameProblemLanguageResultExecution timeMemory
881941hennesseyIntercastellar (JOI22_ho_t1)C++17
25 / 100
311 ms524288 KiB
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { //your code goes here int n; cin >> n; vector <int> arr = {}; for(int i = 0; i < n; i++) { int num; cin >> num; int val = 1; // cout << num << " b " << endl; while(num%2 == 0) { val *= 2; num /= 2; } // cout << num << " v " << endl; for(int i = 1; i <= val; i++) { arr.push_back(num); } } int q; cin >> q; for(int i = 0; i < q; i++) { int x; cin >> x; cout << arr[x-1] << endl; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...