Submission #881721

# Submission time Handle Problem Language Result Execution time Memory
881721 2023-12-01T19:00:23 Z AlphaMale06 Intercastellar (JOI22_ho_t1) C++14
25 / 100
409 ms 524288 KB
#include <bits/stdc++.h>

using namespace std;
#define int long long
#define pb push_back
vector<int> a;

signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin >> n;
    for(int i=0; i < n; i++){
        int cnt=0;
        int x;
        cin >> x;
        while(x%2==0){
            x/=2;
            cnt++;
        }
        for(int j=0; j< (1<<cnt); j++)a.pb(x);
    }
    int q;
    cin >> q;
    while(q--){
        int x;
        cin >> x;
        cout << a[x-1] << '\n';
    }
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 16 ms 6728 KB Output is correct
4 Correct 21 ms 2764 KB Output is correct
5 Correct 35 ms 6584 KB Output is correct
6 Correct 22 ms 9628 KB Output is correct
7 Correct 37 ms 11224 KB Output is correct
8 Correct 41 ms 18376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Runtime error 409 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 16 ms 6728 KB Output is correct
4 Correct 21 ms 2764 KB Output is correct
5 Correct 35 ms 6584 KB Output is correct
6 Correct 22 ms 9628 KB Output is correct
7 Correct 37 ms 11224 KB Output is correct
8 Correct 41 ms 18376 KB Output is correct
9 Correct 1 ms 344 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Runtime error 409 ms 524288 KB Execution killed with signal 9
12 Halted 0 ms 0 KB -