제출 #1128202

#제출 시각아이디문제언어결과실행 시간메모리
1128202yumemysteryIntercastellar (JOI22_ho_t1)C++20
25 / 100
1108 ms589824 KiB
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector <int> castella; for (int i=0; i<n; i++) { int len; cin >> len; if (len%2!=0) castella.push_back(len); else { int tmp=len; while (tmp%2==0) { tmp/=2; } for (int i=1; i<=len/tmp; i++) { castella.push_back(tmp); } } } int Q; cin >> Q; for (int i=0; i<Q; i++) { int search; cin >> search; cout << castella[search-1] << "\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...