# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
700186 | 2023-02-18T19:24:53 Z | Toxtaq | Intercastellar (JOI22_ho_t1) | C++17 | 414 ms | 6836 KB |
#include<bits/stdc++.h> using namespace std; int main() { // ios_base::sync_with_stdio(0); // cin.tie(0); int n; cin >> n; vector<int>v(n); for(int i = 0;i < n;++i)cin >> v[i]; long long q, indx = -1, tempo = 0; cin >> q; while(q--){ long long x; cin >> x; int tmp; while(tempo < x && indx + 1 < n){ indx++; tmp = v[indx]; while(tmp % 2 == 0){ tmp /= 2; } tempo += v[indx] / tmp; } cout << tmp << '\n'; } }
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 | 82 ms | 1672 KB | Output is correct |
4 | Correct | 231 ms | 1716 KB | Output is correct |
5 | Correct | 321 ms | 3112 KB | Output is correct |
6 | Correct | 166 ms | 1980 KB | Output is correct |
7 | Correct | 318 ms | 3020 KB | Output is correct |
8 | Correct | 317 ms | 3044 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 1 ms | 300 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 304 KB | Output is correct |
8 | Correct | 2 ms | 304 KB | Output is correct |
9 | Correct | 1 ms | 212 KB | Output is correct |
10 | Correct | 1 ms | 212 KB | Output is correct |
11 | Correct | 2 ms | 212 KB | Output is correct |
12 | Correct | 3 ms | 212 KB | Output is correct |
13 | Correct | 1 ms | 212 KB | Output is correct |
14 | Correct | 2 ms | 332 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 | 82 ms | 1672 KB | Output is correct |
4 | Correct | 231 ms | 1716 KB | Output is correct |
5 | Correct | 321 ms | 3112 KB | Output is correct |
6 | Correct | 166 ms | 1980 KB | Output is correct |
7 | Correct | 318 ms | 3020 KB | Output is correct |
8 | Correct | 317 ms | 3044 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |
11 | Correct | 0 ms | 212 KB | Output is correct |
12 | Correct | 0 ms | 212 KB | Output is correct |
13 | Correct | 1 ms | 300 KB | Output is correct |
14 | Correct | 1 ms | 212 KB | Output is correct |
15 | Correct | 1 ms | 304 KB | Output is correct |
16 | Correct | 2 ms | 304 KB | Output is correct |
17 | Correct | 1 ms | 212 KB | Output is correct |
18 | Correct | 1 ms | 212 KB | Output is correct |
19 | Correct | 2 ms | 212 KB | Output is correct |
20 | Correct | 3 ms | 212 KB | Output is correct |
21 | Correct | 1 ms | 212 KB | Output is correct |
22 | Correct | 2 ms | 332 KB | Output is correct |
23 | Correct | 194 ms | 2564 KB | Output is correct |
24 | Correct | 180 ms | 3460 KB | Output is correct |
25 | Correct | 379 ms | 6436 KB | Output is correct |
26 | Correct | 237 ms | 4044 KB | Output is correct |
27 | Correct | 198 ms | 3840 KB | Output is correct |
28 | Correct | 413 ms | 6836 KB | Output is correct |
29 | Correct | 414 ms | 6412 KB | Output is correct |
30 | Correct | 268 ms | 3380 KB | Output is correct |
31 | Correct | 414 ms | 6684 KB | Output is correct |