// incorrect/felix-wa-jumps.cpp
#include<bits/stdc++.h>
#include "hieroglyphs.h"
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using ii = pair<int, int>;
int ALPHABET_SIZE = 0;
bool is_subsequence(const vi& a, const vi& b) {
int j = 0;
for (int x : a) {
if (j < (int)b.size() && b[j] == x) {
j++;
}
}
return j == (int)b.size();
}
vi get_candidate(const vi& a, const vi& b) {
int n = a.size();
int m = b.size();
vi occ_a(ALPHABET_SIZE, 0);
vi occ_b(ALPHABET_SIZE, 0);
for (int i=0; i < n; ++i) {
occ_a[a[i]]++;
}
for (int i=0; i < m; ++i) {
occ_b[b[i]]++;
}
vi c;
queue<int> qa;
queue<int> qb;
for (int i=0; i < n; ++i) {
if (occ_a[a[i]] <= occ_b[a[i]]) {
qa.push(i);
}
}
for (int i=0; i < m; ++i) {
if (occ_a[b[i]] > occ_b[b[i]]) {
qb.push(i);
}
}
int i_a_curr = 0;
int i_b_curr = 0;
int i_a_next = 0;
int i_b_next = 0;
vi occ_a_curr = vi(occ_a);
vi occ_a_next = vi(occ_a);
vi occ_b_curr = vi(occ_b);
vi occ_b_next = vi(occ_b);
while(!qa.empty() && !qb.empty()) {
while(i_a_next < qa.front()) {
occ_a_next[a[i_a_next]]--;
i_a_next++;
}
while(i_b_next < qb.front()) {
occ_b_next[b[i_b_next]]--;
i_b_next++;
}
int x = a[i_a_next];
int y = b[i_b_next];
int occ_x = occ_a_next[x];
int occ_y = occ_b_next[y];
bool a_good = (occ_a_next[y] >= occ_y && occ_b_curr[x] > occ_b_next[x]);
bool b_good = (occ_b_next[x] >= occ_x && occ_a_curr[y] > occ_a_next[y]);
if (a_good && b_good) return {-1};
if (!a_good && !b_good) return {-1};
if(a_good) {
c.push_back(x);
qa.pop();
while(i_a_curr <= i_a_next) {
occ_a_curr[a[i_a_curr]]--;
i_a_curr++;
}
while(b[i_b_curr] != x) {
occ_b_curr[b[i_b_curr]]--;
i_b_curr++;
}
occ_b_curr[b[i_b_curr]]--;
i_b_curr++;
}
else {
c.push_back(y);
qb.pop();
while(i_b_curr <= i_b_next) {
occ_b_curr[b[i_b_curr]]--;
i_b_curr++;
}
while(a[i_a_curr] != y) {
occ_a_curr[a[i_a_curr]]--;
i_a_curr++;
}
occ_a_curr[a[i_a_curr]]--;
i_a_curr++;
}
}
while(!qa.empty()) {
c.push_back(a[qa.front()]);
qa.pop();
}
while(!qb.empty()) {
c.push_back(b[qb.front()]);
qb.pop();
}
return ((is_subsequence(a, c) && is_subsequence(b, c)) ? c : vi({-1}));
}
bool verify_jump(const vi& a, const vi& b, const vi& c) {
if (c == vi({-1})) return false;
if (c == vi()) return true;
int n = a.size();
int m = b.size();
int l = c.size();
vi occ_a(ALPHABET_SIZE, 0);
vi occ_b(ALPHABET_SIZE, 0);
vi occ_c(ALPHABET_SIZE, 0);
vvi pos_a(ALPHABET_SIZE);
vvi pos_b(ALPHABET_SIZE);
vvi pos_c(ALPHABET_SIZE);
for (int i=0; i < n; ++i) {
occ_a[a[i]]++;
pos_a[a[i]].push_back(i);
}
for (int i=0; i < m; ++i) {
occ_b[b[i]]++;
pos_b[b[i]].push_back(i);
}
for (int i=0; i < l; ++i) {
occ_c[c[i]]++;
pos_c[c[i]].push_back(i);
}
vi pos_c_idx(ALPHABET_SIZE);
vi jump_left(l);
for (int i=0; i < l; ++i) jump_left[i] = i;
int c_idx = 0;
for (int j=0; j < m; ++j) {
int idx = pos_c_idx[b[j]];
if (idx < occ_c[b[j]]) {
jump_left[pos_c[b[j]][idx]] = min(jump_left[pos_c[b[j]][idx]], c_idx);
pos_c_idx[b[j]]++;
}
if (b[j] == c[c_idx]) {
// pos_c_idx[b[j]]++;
c_idx++;
if (c_idx == l) break;
}
}
vi jump_right(l);
for (int i=0; i < l; ++i) jump_right[i] = i;
c_idx--;
for (int i=n-1; i > -1; --i) {
int idx = pos_c_idx[a[i]]-1;
if (idx > -1) {
jump_right[pos_c[a[i]][idx]] = max(jump_right[pos_c[a[i]][idx]], c_idx);
pos_c_idx[a[i]]--;
}
if (a[i] == c[c_idx]) {
//pos_c_idx[a[i]]--;
c_idx--;
if (c_idx < 0) break;
}
}
vector<ii> stack_jump;
for (int k=0; k < l; ++k) {
while (!stack_jump.empty() && stack_jump.back().second < k) {
stack_jump.pop_back();
}
if (!stack_jump.empty() && stack_jump.back().first >= jump_left[k]) {
return false;
}
while (!stack_jump.empty() && stack_jump.back().second < jump_right[k]) {
stack_jump.pop_back();
}
stack_jump.emplace_back(k, jump_right[k]);
}
return true;
}
bool verify(const vi& a, const vi& b, const vi& c) {
return verify_jump(a, b, c) && verify_jump(b, a, c);
}
vector<int> ucs(vector<int> a, vector<int> b) {
for (int x : a) ALPHABET_SIZE = max(ALPHABET_SIZE, x+1);
for (int x : b) ALPHABET_SIZE = max(ALPHABET_SIZE, x+1);
vi c = get_candidate(a, b);
if (verify(a, b, c)) return c;
return {-1};
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
101 ms |
21176 KB |
Output is correct |
6 |
Correct |
20 ms |
5192 KB |
Output is correct |
7 |
Correct |
20 ms |
5188 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
101 ms |
21176 KB |
Output is correct |
6 |
Correct |
20 ms |
5192 KB |
Output is correct |
7 |
Correct |
20 ms |
5188 KB |
Output is correct |
8 |
Correct |
97 ms |
25184 KB |
Output is correct |
9 |
Correct |
98 ms |
25260 KB |
Output is correct |
10 |
Correct |
93 ms |
25236 KB |
Output is correct |
11 |
Correct |
91 ms |
25232 KB |
Output is correct |
12 |
Correct |
95 ms |
25300 KB |
Output is correct |
13 |
Correct |
93 ms |
25316 KB |
Output is correct |
14 |
Correct |
94 ms |
25272 KB |
Output is correct |
15 |
Correct |
100 ms |
25224 KB |
Output is correct |
16 |
Correct |
104 ms |
25408 KB |
Output is correct |
17 |
Correct |
84 ms |
25316 KB |
Output is correct |
18 |
Correct |
12 ms |
17504 KB |
Output is correct |
19 |
Correct |
12 ms |
17220 KB |
Output is correct |
20 |
Correct |
14 ms |
17676 KB |
Output is correct |
21 |
Correct |
13 ms |
17676 KB |
Output is correct |
22 |
Correct |
58 ms |
22312 KB |
Output is correct |
23 |
Correct |
80 ms |
25448 KB |
Output is correct |
24 |
Correct |
93 ms |
25280 KB |
Output is correct |
25 |
Correct |
88 ms |
25452 KB |
Output is correct |
26 |
Correct |
71 ms |
22952 KB |
Output is correct |
27 |
Correct |
92 ms |
25168 KB |
Output is correct |
28 |
Correct |
99 ms |
25392 KB |
Output is correct |
29 |
Correct |
73 ms |
25180 KB |
Output is correct |
30 |
Correct |
60 ms |
25268 KB |
Output is correct |
31 |
Correct |
96 ms |
25240 KB |
Output is correct |
32 |
Correct |
95 ms |
25176 KB |
Output is correct |
33 |
Correct |
121 ms |
25264 KB |
Output is correct |
34 |
Correct |
59 ms |
24480 KB |
Output is correct |
35 |
Correct |
94 ms |
25476 KB |
Output is correct |
36 |
Correct |
92 ms |
25352 KB |
Output is correct |
37 |
Correct |
53 ms |
25180 KB |
Output is correct |
38 |
Correct |
77 ms |
25408 KB |
Output is correct |
39 |
Correct |
107 ms |
25236 KB |
Output is correct |
40 |
Correct |
49 ms |
25224 KB |
Output is correct |
41 |
Correct |
91 ms |
25212 KB |
Output is correct |
42 |
Correct |
52 ms |
25360 KB |
Output is correct |
43 |
Correct |
60 ms |
25252 KB |
Output is correct |
44 |
Correct |
51 ms |
25300 KB |
Output is correct |
45 |
Correct |
47 ms |
25256 KB |
Output is correct |
46 |
Correct |
50 ms |
25216 KB |
Output is correct |
47 |
Correct |
53 ms |
25200 KB |
Output is correct |
48 |
Correct |
48 ms |
25264 KB |
Output is correct |
49 |
Correct |
52 ms |
25256 KB |
Output is correct |
50 |
Correct |
82 ms |
25308 KB |
Output is correct |
51 |
Correct |
102 ms |
25296 KB |
Output is correct |
52 |
Correct |
67 ms |
25308 KB |
Output is correct |
53 |
Correct |
63 ms |
25296 KB |
Output is correct |
54 |
Correct |
53 ms |
25220 KB |
Output is correct |
55 |
Correct |
64 ms |
25380 KB |
Output is correct |
56 |
Correct |
90 ms |
25232 KB |
Output is correct |
57 |
Correct |
59 ms |
25224 KB |
Output is correct |
58 |
Correct |
133 ms |
25252 KB |
Output is correct |
59 |
Correct |
80 ms |
25396 KB |
Output is correct |
60 |
Correct |
45 ms |
25232 KB |
Output is correct |
61 |
Correct |
45 ms |
25148 KB |
Output is correct |
62 |
Correct |
46 ms |
25224 KB |
Output is correct |
63 |
Correct |
77 ms |
25228 KB |
Output is correct |
64 |
Correct |
51 ms |
25220 KB |
Output is correct |
65 |
Correct |
83 ms |
25216 KB |
Output is correct |
66 |
Correct |
78 ms |
25308 KB |
Output is correct |
67 |
Correct |
75 ms |
25228 KB |
Output is correct |
68 |
Correct |
54 ms |
25220 KB |
Output is correct |
69 |
Correct |
0 ms |
348 KB |
Output is correct |
70 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
54 ms |
4824 KB |
Output is correct |
2 |
Correct |
36 ms |
4848 KB |
Output is correct |
3 |
Correct |
23 ms |
3916 KB |
Output is correct |
4 |
Correct |
24 ms |
3868 KB |
Output is correct |
5 |
Correct |
36 ms |
4468 KB |
Output is correct |
6 |
Correct |
13 ms |
1944 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
348 KB |
Output is correct |
16 |
Correct |
31 ms |
5080 KB |
Output is correct |
17 |
Correct |
12 ms |
2396 KB |
Output is correct |
18 |
Correct |
20 ms |
3136 KB |
Output is correct |
19 |
Correct |
9 ms |
1880 KB |
Output is correct |
20 |
Correct |
23 ms |
4016 KB |
Output is correct |
21 |
Correct |
15 ms |
2140 KB |
Output is correct |
22 |
Correct |
20 ms |
2396 KB |
Output is correct |
23 |
Correct |
14 ms |
4684 KB |
Output is correct |
24 |
Correct |
24 ms |
4908 KB |
Output is correct |
25 |
Correct |
11 ms |
3032 KB |
Output is correct |
26 |
Correct |
22 ms |
4744 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
97 ms |
25184 KB |
Output is correct |
2 |
Correct |
98 ms |
25260 KB |
Output is correct |
3 |
Correct |
93 ms |
25236 KB |
Output is correct |
4 |
Correct |
91 ms |
25232 KB |
Output is correct |
5 |
Correct |
95 ms |
25300 KB |
Output is correct |
6 |
Correct |
93 ms |
25316 KB |
Output is correct |
7 |
Correct |
94 ms |
25272 KB |
Output is correct |
8 |
Correct |
100 ms |
25224 KB |
Output is correct |
9 |
Correct |
104 ms |
25408 KB |
Output is correct |
10 |
Correct |
84 ms |
25316 KB |
Output is correct |
11 |
Correct |
12 ms |
17504 KB |
Output is correct |
12 |
Correct |
12 ms |
17220 KB |
Output is correct |
13 |
Correct |
14 ms |
17676 KB |
Output is correct |
14 |
Correct |
13 ms |
17676 KB |
Output is correct |
15 |
Correct |
58 ms |
22312 KB |
Output is correct |
16 |
Correct |
80 ms |
25448 KB |
Output is correct |
17 |
Correct |
93 ms |
25280 KB |
Output is correct |
18 |
Correct |
88 ms |
25452 KB |
Output is correct |
19 |
Correct |
71 ms |
22952 KB |
Output is correct |
20 |
Correct |
54 ms |
4824 KB |
Output is correct |
21 |
Correct |
36 ms |
4848 KB |
Output is correct |
22 |
Correct |
23 ms |
3916 KB |
Output is correct |
23 |
Correct |
24 ms |
3868 KB |
Output is correct |
24 |
Correct |
36 ms |
4468 KB |
Output is correct |
25 |
Correct |
13 ms |
1944 KB |
Output is correct |
26 |
Correct |
16 ms |
17476 KB |
Output is correct |
27 |
Correct |
11 ms |
17572 KB |
Output is correct |
28 |
Correct |
14 ms |
15704 KB |
Output is correct |
29 |
Correct |
10 ms |
16612 KB |
Output is correct |
30 |
Correct |
10 ms |
18292 KB |
Output is correct |
31 |
Correct |
13 ms |
17580 KB |
Output is correct |
32 |
Correct |
11 ms |
17760 KB |
Output is correct |
33 |
Correct |
13 ms |
17712 KB |
Output is correct |
34 |
Correct |
16 ms |
17856 KB |
Output is correct |
35 |
Correct |
36 ms |
21464 KB |
Output is correct |
36 |
Correct |
46 ms |
21984 KB |
Output is correct |
37 |
Correct |
41 ms |
22008 KB |
Output is correct |
38 |
Correct |
37 ms |
21764 KB |
Output is correct |
39 |
Correct |
38 ms |
21792 KB |
Output is correct |
40 |
Correct |
69 ms |
23888 KB |
Output is correct |
41 |
Correct |
68 ms |
22628 KB |
Output is correct |
42 |
Correct |
25 ms |
15676 KB |
Output is correct |
43 |
Correct |
32 ms |
17256 KB |
Output is correct |
44 |
Correct |
30 ms |
16944 KB |
Output is correct |
45 |
Correct |
32 ms |
15584 KB |
Output is correct |
46 |
Correct |
64 ms |
23152 KB |
Output is correct |
47 |
Correct |
65 ms |
23004 KB |
Output is correct |
48 |
Correct |
66 ms |
23004 KB |
Output is correct |
49 |
Correct |
68 ms |
22596 KB |
Output is correct |
50 |
Correct |
65 ms |
22736 KB |
Output is correct |
51 |
Correct |
87 ms |
22728 KB |
Output is correct |
52 |
Correct |
68 ms |
22780 KB |
Output is correct |
53 |
Correct |
63 ms |
22532 KB |
Output is correct |
54 |
Correct |
75 ms |
22716 KB |
Output is correct |
55 |
Correct |
23 ms |
18620 KB |
Output is correct |
56 |
Correct |
48 ms |
21904 KB |
Output is correct |
57 |
Correct |
46 ms |
21736 KB |
Output is correct |
58 |
Correct |
49 ms |
22116 KB |
Output is correct |
59 |
Correct |
58 ms |
22036 KB |
Output is correct |
60 |
Correct |
66 ms |
22348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
16 ms |
17476 KB |
Output is correct |
11 |
Correct |
11 ms |
17572 KB |
Output is correct |
12 |
Correct |
14 ms |
15704 KB |
Output is correct |
13 |
Correct |
10 ms |
16612 KB |
Output is correct |
14 |
Correct |
10 ms |
18292 KB |
Output is correct |
15 |
Correct |
13 ms |
17580 KB |
Output is correct |
16 |
Correct |
11 ms |
17760 KB |
Output is correct |
17 |
Correct |
13 ms |
17712 KB |
Output is correct |
18 |
Correct |
2 ms |
604 KB |
Output is correct |
19 |
Correct |
2 ms |
604 KB |
Output is correct |
20 |
Correct |
2 ms |
604 KB |
Output is correct |
21 |
Correct |
2 ms |
604 KB |
Output is correct |
22 |
Correct |
2 ms |
524 KB |
Output is correct |
23 |
Correct |
1 ms |
604 KB |
Output is correct |
24 |
Correct |
1 ms |
604 KB |
Output is correct |
25 |
Correct |
2 ms |
604 KB |
Output is correct |
26 |
Correct |
2 ms |
604 KB |
Output is correct |
27 |
Correct |
14 ms |
17684 KB |
Output is correct |
28 |
Correct |
14 ms |
17676 KB |
Output is correct |
29 |
Correct |
16 ms |
17860 KB |
Output is correct |
30 |
Correct |
14 ms |
17624 KB |
Output is correct |
31 |
Correct |
12 ms |
17224 KB |
Output is correct |
32 |
Correct |
18 ms |
17080 KB |
Output is correct |
33 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
34 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
101 ms |
21176 KB |
Output is correct |
9 |
Correct |
20 ms |
5192 KB |
Output is correct |
10 |
Correct |
20 ms |
5188 KB |
Output is correct |
11 |
Correct |
97 ms |
25184 KB |
Output is correct |
12 |
Correct |
98 ms |
25260 KB |
Output is correct |
13 |
Correct |
93 ms |
25236 KB |
Output is correct |
14 |
Correct |
91 ms |
25232 KB |
Output is correct |
15 |
Correct |
95 ms |
25300 KB |
Output is correct |
16 |
Correct |
93 ms |
25316 KB |
Output is correct |
17 |
Correct |
94 ms |
25272 KB |
Output is correct |
18 |
Correct |
100 ms |
25224 KB |
Output is correct |
19 |
Correct |
104 ms |
25408 KB |
Output is correct |
20 |
Correct |
84 ms |
25316 KB |
Output is correct |
21 |
Correct |
12 ms |
17504 KB |
Output is correct |
22 |
Correct |
12 ms |
17220 KB |
Output is correct |
23 |
Correct |
14 ms |
17676 KB |
Output is correct |
24 |
Correct |
13 ms |
17676 KB |
Output is correct |
25 |
Correct |
58 ms |
22312 KB |
Output is correct |
26 |
Correct |
80 ms |
25448 KB |
Output is correct |
27 |
Correct |
93 ms |
25280 KB |
Output is correct |
28 |
Correct |
88 ms |
25452 KB |
Output is correct |
29 |
Correct |
71 ms |
22952 KB |
Output is correct |
30 |
Correct |
92 ms |
25168 KB |
Output is correct |
31 |
Correct |
99 ms |
25392 KB |
Output is correct |
32 |
Correct |
73 ms |
25180 KB |
Output is correct |
33 |
Correct |
60 ms |
25268 KB |
Output is correct |
34 |
Correct |
96 ms |
25240 KB |
Output is correct |
35 |
Correct |
95 ms |
25176 KB |
Output is correct |
36 |
Correct |
121 ms |
25264 KB |
Output is correct |
37 |
Correct |
59 ms |
24480 KB |
Output is correct |
38 |
Correct |
94 ms |
25476 KB |
Output is correct |
39 |
Correct |
92 ms |
25352 KB |
Output is correct |
40 |
Correct |
53 ms |
25180 KB |
Output is correct |
41 |
Correct |
77 ms |
25408 KB |
Output is correct |
42 |
Correct |
107 ms |
25236 KB |
Output is correct |
43 |
Correct |
49 ms |
25224 KB |
Output is correct |
44 |
Correct |
91 ms |
25212 KB |
Output is correct |
45 |
Correct |
52 ms |
25360 KB |
Output is correct |
46 |
Correct |
60 ms |
25252 KB |
Output is correct |
47 |
Correct |
51 ms |
25300 KB |
Output is correct |
48 |
Correct |
47 ms |
25256 KB |
Output is correct |
49 |
Correct |
50 ms |
25216 KB |
Output is correct |
50 |
Correct |
53 ms |
25200 KB |
Output is correct |
51 |
Correct |
48 ms |
25264 KB |
Output is correct |
52 |
Correct |
52 ms |
25256 KB |
Output is correct |
53 |
Correct |
82 ms |
25308 KB |
Output is correct |
54 |
Correct |
102 ms |
25296 KB |
Output is correct |
55 |
Correct |
67 ms |
25308 KB |
Output is correct |
56 |
Correct |
63 ms |
25296 KB |
Output is correct |
57 |
Correct |
53 ms |
25220 KB |
Output is correct |
58 |
Correct |
64 ms |
25380 KB |
Output is correct |
59 |
Correct |
90 ms |
25232 KB |
Output is correct |
60 |
Correct |
59 ms |
25224 KB |
Output is correct |
61 |
Correct |
133 ms |
25252 KB |
Output is correct |
62 |
Correct |
80 ms |
25396 KB |
Output is correct |
63 |
Correct |
45 ms |
25232 KB |
Output is correct |
64 |
Correct |
45 ms |
25148 KB |
Output is correct |
65 |
Correct |
46 ms |
25224 KB |
Output is correct |
66 |
Correct |
77 ms |
25228 KB |
Output is correct |
67 |
Correct |
51 ms |
25220 KB |
Output is correct |
68 |
Correct |
83 ms |
25216 KB |
Output is correct |
69 |
Correct |
78 ms |
25308 KB |
Output is correct |
70 |
Correct |
75 ms |
25228 KB |
Output is correct |
71 |
Correct |
54 ms |
25220 KB |
Output is correct |
72 |
Correct |
0 ms |
348 KB |
Output is correct |
73 |
Correct |
0 ms |
348 KB |
Output is correct |
74 |
Correct |
54 ms |
4824 KB |
Output is correct |
75 |
Correct |
36 ms |
4848 KB |
Output is correct |
76 |
Correct |
23 ms |
3916 KB |
Output is correct |
77 |
Correct |
24 ms |
3868 KB |
Output is correct |
78 |
Correct |
36 ms |
4468 KB |
Output is correct |
79 |
Correct |
13 ms |
1944 KB |
Output is correct |
80 |
Correct |
0 ms |
348 KB |
Output is correct |
81 |
Correct |
0 ms |
348 KB |
Output is correct |
82 |
Correct |
0 ms |
348 KB |
Output is correct |
83 |
Correct |
1 ms |
348 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
0 ms |
348 KB |
Output is correct |
86 |
Correct |
0 ms |
344 KB |
Output is correct |
87 |
Correct |
0 ms |
348 KB |
Output is correct |
88 |
Correct |
1 ms |
348 KB |
Output is correct |
89 |
Correct |
31 ms |
5080 KB |
Output is correct |
90 |
Correct |
12 ms |
2396 KB |
Output is correct |
91 |
Correct |
20 ms |
3136 KB |
Output is correct |
92 |
Correct |
9 ms |
1880 KB |
Output is correct |
93 |
Correct |
23 ms |
4016 KB |
Output is correct |
94 |
Correct |
15 ms |
2140 KB |
Output is correct |
95 |
Correct |
20 ms |
2396 KB |
Output is correct |
96 |
Correct |
14 ms |
4684 KB |
Output is correct |
97 |
Correct |
24 ms |
4908 KB |
Output is correct |
98 |
Correct |
11 ms |
3032 KB |
Output is correct |
99 |
Correct |
22 ms |
4744 KB |
Output is correct |
100 |
Correct |
16 ms |
17476 KB |
Output is correct |
101 |
Correct |
11 ms |
17572 KB |
Output is correct |
102 |
Correct |
14 ms |
15704 KB |
Output is correct |
103 |
Correct |
10 ms |
16612 KB |
Output is correct |
104 |
Correct |
10 ms |
18292 KB |
Output is correct |
105 |
Correct |
13 ms |
17580 KB |
Output is correct |
106 |
Correct |
11 ms |
17760 KB |
Output is correct |
107 |
Correct |
13 ms |
17712 KB |
Output is correct |
108 |
Correct |
16 ms |
17856 KB |
Output is correct |
109 |
Correct |
36 ms |
21464 KB |
Output is correct |
110 |
Correct |
46 ms |
21984 KB |
Output is correct |
111 |
Correct |
41 ms |
22008 KB |
Output is correct |
112 |
Correct |
37 ms |
21764 KB |
Output is correct |
113 |
Correct |
38 ms |
21792 KB |
Output is correct |
114 |
Correct |
69 ms |
23888 KB |
Output is correct |
115 |
Correct |
68 ms |
22628 KB |
Output is correct |
116 |
Correct |
25 ms |
15676 KB |
Output is correct |
117 |
Correct |
32 ms |
17256 KB |
Output is correct |
118 |
Correct |
30 ms |
16944 KB |
Output is correct |
119 |
Correct |
32 ms |
15584 KB |
Output is correct |
120 |
Correct |
64 ms |
23152 KB |
Output is correct |
121 |
Correct |
65 ms |
23004 KB |
Output is correct |
122 |
Correct |
66 ms |
23004 KB |
Output is correct |
123 |
Correct |
68 ms |
22596 KB |
Output is correct |
124 |
Correct |
65 ms |
22736 KB |
Output is correct |
125 |
Correct |
87 ms |
22728 KB |
Output is correct |
126 |
Correct |
68 ms |
22780 KB |
Output is correct |
127 |
Correct |
63 ms |
22532 KB |
Output is correct |
128 |
Correct |
75 ms |
22716 KB |
Output is correct |
129 |
Correct |
23 ms |
18620 KB |
Output is correct |
130 |
Correct |
48 ms |
21904 KB |
Output is correct |
131 |
Correct |
46 ms |
21736 KB |
Output is correct |
132 |
Correct |
49 ms |
22116 KB |
Output is correct |
133 |
Correct |
58 ms |
22036 KB |
Output is correct |
134 |
Correct |
66 ms |
22348 KB |
Output is correct |
135 |
Correct |
2 ms |
604 KB |
Output is correct |
136 |
Correct |
2 ms |
604 KB |
Output is correct |
137 |
Correct |
2 ms |
604 KB |
Output is correct |
138 |
Correct |
2 ms |
604 KB |
Output is correct |
139 |
Correct |
2 ms |
524 KB |
Output is correct |
140 |
Correct |
1 ms |
604 KB |
Output is correct |
141 |
Correct |
1 ms |
604 KB |
Output is correct |
142 |
Correct |
2 ms |
604 KB |
Output is correct |
143 |
Correct |
2 ms |
604 KB |
Output is correct |
144 |
Correct |
14 ms |
17684 KB |
Output is correct |
145 |
Correct |
14 ms |
17676 KB |
Output is correct |
146 |
Correct |
16 ms |
17860 KB |
Output is correct |
147 |
Correct |
14 ms |
17624 KB |
Output is correct |
148 |
Correct |
12 ms |
17224 KB |
Output is correct |
149 |
Correct |
18 ms |
17080 KB |
Output is correct |
150 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
151 |
Halted |
0 ms |
0 KB |
- |