제출 #1196389

#제출 시각아이디문제언어결과실행 시간메모리
1196389buraphon_numberoneIntercastellar (JOI22_ho_t1)C++20
25 / 100
643 ms589824 KiB
#include <bits/stdc++.h> using namespace std; using vll = vector<long long>; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; vector<int> a(n); for(int i=0; i<n; i++) { cin >> a[i]; } vll nn; for(int i=0; i<n; i++) { int x = a[i]; int count = 1; while(x %2 == 0) { x/=2; count++; } for(int j=0; j<a[i]/x; j++) { nn.push_back(x); } } // for(auto &a: nn) // { // cout << a << " "; // } // cout << " "; int q; cin >> q; while(q--) { int qi; cin >> qi; cout << nn[qi-1] << '\n'; } return (0); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...