Submission #836621

# Submission time Handle Problem Language Result Execution time Memory
836621 2023-08-24T13:27:54 Z 12345678 Intercastellar (JOI22_ho_t1) C++17
100 / 100
54 ms 10772 KB
#include <bits/stdc++.h>

using namespace std;

#define ll long long

const int nx=2e5+5;
ll n, q, a[nx], l[nx], x, qs[nx], c=1;

int main()
{
    cin.tie(NULL)->sync_with_stdio(false);
    cin>>n;
    for (int i=1; i<=n; i++) cin>>l[i], a[i]=l[i]&-l[i], qs[i]=qs[i-1]+a[i];
    cin>>q;
    while (q--)
    {
        cin>>x;
        while (x>qs[c]) c++;
        cout<<l[c]/a[c]<<'\n';
    }
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 14 ms 5460 KB Output is correct
4 Correct 22 ms 2732 KB Output is correct
5 Correct 35 ms 7112 KB Output is correct
6 Correct 27 ms 5332 KB Output is correct
7 Correct 35 ms 7128 KB Output is correct
8 Correct 37 ms 7116 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 400 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 14 ms 5460 KB Output is correct
4 Correct 22 ms 2732 KB Output is correct
5 Correct 35 ms 7112 KB Output is correct
6 Correct 27 ms 5332 KB Output is correct
7 Correct 35 ms 7128 KB Output is correct
8 Correct 37 ms 7116 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 400 KB Output is correct
23 Correct 20 ms 3284 KB Output is correct
24 Correct 25 ms 6348 KB Output is correct
25 Correct 47 ms 10328 KB Output is correct
26 Correct 30 ms 6548 KB Output is correct
27 Correct 28 ms 6728 KB Output is correct
28 Correct 54 ms 10772 KB Output is correct
29 Correct 50 ms 10168 KB Output is correct
30 Correct 28 ms 3916 KB Output is correct
31 Correct 52 ms 10652 KB Output is correct