# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
709824 | 2023-03-14T14:49:57 Z | rainboy | Intercastellar (JOI22_ho_t1) | C | 101 ms | 8352 KB |
#include <stdio.h> #define N 200000 int main() { static int aa[N]; static long long kk[N]; int n, n_, q, i; scanf("%d", &n); n_ = 0; for (i = 0; i < n; i++) { int a, k; scanf("%d", &a); k = 1; while (a % 2 == 0) a /= 2, k *= 2; aa[n_] = a, kk[n_] = k, n_++; } for (i = 1; i < n; i++) kk[i] += kk[i - 1]; scanf("%d", &q); i = 0; while (q--) { long long k; scanf("%lld", &k); while (kk[i] < k) i++; printf("%d\n", aa[i]); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 36 ms | 3220 KB | Output is correct |
4 | Correct | 51 ms | 2108 KB | Output is correct |
5 | Correct | 85 ms | 4604 KB | Output is correct |
6 | Correct | 34 ms | 3276 KB | Output is correct |
7 | Correct | 68 ms | 4652 KB | Output is correct |
8 | Correct | 59 ms | 4820 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 292 KB | Output is correct |
5 | Correct | 1 ms | 292 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 300 KB | Output is correct |
8 | Correct | 1 ms | 212 KB | Output is correct |
9 | Correct | 1 ms | 292 KB | Output is correct |
10 | Correct | 1 ms | 292 KB | Output is correct |
11 | Correct | 1 ms | 212 KB | Output is correct |
12 | Correct | 1 ms | 212 KB | Output is correct |
13 | Correct | 1 ms | 304 KB | Output is correct |
14 | Correct | 1 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 36 ms | 3220 KB | Output is correct |
4 | Correct | 51 ms | 2108 KB | Output is correct |
5 | Correct | 85 ms | 4604 KB | Output is correct |
6 | Correct | 34 ms | 3276 KB | Output is correct |
7 | Correct | 68 ms | 4652 KB | Output is correct |
8 | Correct | 59 ms | 4820 KB | Output is correct |
9 | Correct | 1 ms | 212 KB | Output is correct |
10 | Correct | 1 ms | 212 KB | Output is correct |
11 | Correct | 1 ms | 212 KB | Output is correct |
12 | Correct | 1 ms | 292 KB | Output is correct |
13 | Correct | 1 ms | 292 KB | Output is correct |
14 | Correct | 1 ms | 212 KB | Output is correct |
15 | Correct | 1 ms | 300 KB | Output is correct |
16 | Correct | 1 ms | 212 KB | Output is correct |
17 | Correct | 1 ms | 292 KB | Output is correct |
18 | Correct | 1 ms | 292 KB | Output is correct |
19 | Correct | 1 ms | 212 KB | Output is correct |
20 | Correct | 1 ms | 212 KB | Output is correct |
21 | Correct | 1 ms | 304 KB | Output is correct |
22 | Correct | 1 ms | 212 KB | Output is correct |
23 | Correct | 34 ms | 2832 KB | Output is correct |
24 | Correct | 48 ms | 4576 KB | Output is correct |
25 | Correct | 101 ms | 7900 KB | Output is correct |
26 | Correct | 57 ms | 4944 KB | Output is correct |
27 | Correct | 52 ms | 4924 KB | Output is correct |
28 | Correct | 91 ms | 8352 KB | Output is correct |
29 | Correct | 88 ms | 7868 KB | Output is correct |
30 | Correct | 50 ms | 3608 KB | Output is correct |
31 | Correct | 89 ms | 8264 KB | Output is correct |