# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
700189 | 2023-02-18T19:29:44 Z | Toxtaq | Intercastellar (JOI22_ho_t1) | C++17 | 78 ms | 2892 KB |
#include<cstdio> #include<vector> using namespace std; int main() { int n; scanf("%d", &n); vector<int>v(n); for(int i = 0;i < n;++i)scanf("%d", &v[i]); long long indx = -1, tempo = 0; int q; scanf("%d", &q); while(q--){ long long x; scanf("%lld", &x); int tmp; while(tempo < x && indx + 1 < n){ indx++; tmp = v[indx]; while(tmp % 2 == 0){ tmp /= 2; } tempo += v[indx] / tmp; } printf("%d\n", tmp); } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 23 ms | 1052 KB | Output is correct |
4 | Correct | 32 ms | 776 KB | Output is correct |
5 | Correct | 57 ms | 1404 KB | Output is correct |
6 | Correct | 33 ms | 1080 KB | Output is correct |
7 | Correct | 54 ms | 1356 KB | Output is correct |
8 | Correct | 57 ms | 1464 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | 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 | 0 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
7 | Correct | 0 ms | 212 KB | Output is correct |
8 | Correct | 1 ms | 212 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 | 212 KB | Output is correct |
13 | Correct | 1 ms | 212 KB | Output is correct |
14 | Correct | 1 ms | 212 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 23 ms | 1052 KB | Output is correct |
4 | Correct | 32 ms | 776 KB | Output is correct |
5 | Correct | 57 ms | 1404 KB | Output is correct |
6 | Correct | 33 ms | 1080 KB | Output is correct |
7 | Correct | 54 ms | 1356 KB | Output is correct |
8 | Correct | 57 ms | 1464 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 | 0 ms | 212 KB | Output is correct |
14 | Correct | 1 ms | 212 KB | Output is correct |
15 | Correct | 0 ms | 212 KB | Output is correct |
16 | Correct | 1 ms | 212 KB | Output is correct |
17 | Correct | 1 ms | 212 KB | Output is correct |
18 | Correct | 1 ms | 212 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 | 212 KB | Output is correct |
22 | Correct | 1 ms | 212 KB | Output is correct |
23 | Correct | 29 ms | 1492 KB | Output is correct |
24 | Correct | 34 ms | 1556 KB | Output is correct |
25 | Correct | 68 ms | 2892 KB | Output is correct |
26 | Correct | 45 ms | 1356 KB | Output is correct |
27 | Correct | 43 ms | 1276 KB | Output is correct |
28 | Correct | 77 ms | 2092 KB | Output is correct |
29 | Correct | 78 ms | 1344 KB | Output is correct |
30 | Correct | 40 ms | 976 KB | Output is correct |
31 | Correct | 76 ms | 1964 KB | Output is correct |