/**
_ _ __ _ _ _ _ _ _
|a ||t ||o d | |o |
| __ _| | _ | __| _ |
| __ |/_ | __ /__\ / _\|
**/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N_MAX = 100000;
int N;
ll A[N_MAX + 2];
struct Block {
int l, r;
bool contains (int i) {
return (l <= i && i <= r);
}
};
struct SegInfo {
ll val; int cnt;
ll lazy;
void add (const ll &x) {
val += x; lazy += x;
}
};
SegInfo operator + (const SegInfo &A, const SegInfo &B) {
SegInfo C;
C.val = min(A.val, B.val);
C.cnt = (C.val == A.val ? A.cnt : 0) + (C.val == B.val ? B.cnt : 0);
C.lazy = 0;
return C;
}
void build_tree (SegInfo seg_tree[], int node, int l, int r) {
seg_tree[node].cnt = r - l + 1;
if (l != r) {
int mid = (l + r) / 2;
int left = node * 2, right = node * 2 + 1;
build_tree(seg_tree, left, l, mid);
build_tree(seg_tree, right, mid + 1, r);
}
}
void build_tree (SegInfo seg_tree[]) {
build_tree(seg_tree, 1, 1, N);
}
void update_tree (SegInfo seg_tree[], int node, int l, int r, int ul, int ur, ll x) {
if (ul <= l && r <= ur) {
seg_tree[node].add(x);
return;
}
int mid = (l + r) / 2;
int left = node * 2, right = node * 2 + 1;
seg_tree[left].add(seg_tree[node].lazy);
seg_tree[right].add(seg_tree[node].lazy);
seg_tree[node].lazy = 0;
if (ul <= mid) {
update_tree(seg_tree, left, l, mid, ul, ur, x);
}
if (mid + 1 <= ur) {
update_tree(seg_tree, right, mid + 1, r, ul, ur, x);
}
seg_tree[node] = seg_tree[left] + seg_tree[right];
}
void update_tree (SegInfo seg_tree[], int ul, int ur, ll x) {
update_tree(seg_tree, 1, 1, N, ul, ur, x);
}
void update_tree (SegInfo seg_tree[], int i, ll x) {
update_tree(seg_tree, 1, 1, N, i, i, x);
}
SegInfo query_cnt (SegInfo seg_tree[], int node, int l, int r, int ql, int qr) {
if (ql <= l && r <= qr) {
return seg_tree[node];
}
int mid = (l + r) / 2;
int left = node * 2, right = node * 2 + 1;
seg_tree[left].add(seg_tree[node].lazy);
seg_tree[right].add(seg_tree[node].lazy);
seg_tree[node].lazy = 0;
if (ql <= mid && mid + 1 <= qr) {
return query_cnt(seg_tree, left, l, mid, ql, qr)
+ query_cnt(seg_tree, right, mid + 1, r, ql, qr);
} else if (qr <= mid) {
return query_cnt(seg_tree, left, l, mid, ql, qr);
} else {
return query_cnt(seg_tree, right, mid + 1, r, ql, qr);
}
}
int query_cnt (SegInfo seg_tree[], int ql, int qr) {
return query_cnt(seg_tree, 1, 1, N, ql, qr).cnt;
}
int query_last (SegInfo seg_tree[], int node, int l, int r, int i, ll val) {
if (seg_tree[node].val > val) {
return 0;
}
if (l == r) {
return l;
}
int mid = (l + r) / 2;
int left = node * 2, right = node * 2 + 1;
seg_tree[left].add(seg_tree[node].lazy);
seg_tree[right].add(seg_tree[node].lazy);
seg_tree[node].lazy = 0;
if (i <= mid) {
return query_last(seg_tree, left, l, mid, i, val);
} else {
int j = query_last(seg_tree, right, mid + 1, r, i, val);
return (j != 0 ? j : query_last(seg_tree, left, l, mid, i, val));
}
}
int query_last (SegInfo seg_tree[], int i, ll val) {
return query_last(seg_tree, 1, 1, N, i, val);
}
int query_first (SegInfo seg_tree[], int node, int l, int r, int i, ll val) {
if (seg_tree[node].val > val) {
return N + 1;
}
if (l == r) {
return l;
}
int mid = (l + r) / 2;
int left = node * 2, right = node * 2 + 1;
seg_tree[left].add(seg_tree[node].lazy);
seg_tree[right].add(seg_tree[node].lazy);
seg_tree[node].lazy = 0;
if (mid + 1 <= i) {
return query_first(seg_tree, right, mid + 1, r, i, val);
} else {
int j = query_first(seg_tree, left, l, mid, i, val);
return (j != N + 1 ? j : query_first(seg_tree, right, mid + 1, r, i, val));
}
}
int query_first (SegInfo seg_tree[], int i, ll val) {
return query_first(seg_tree, 1, 1, N, i, val);
}
SegInfo min_tree[N_MAX * 4 + 2];
void add_block (Block b) {
update_tree(min_tree, b.l, b.r, +1);
}
void del_block (Block b) {
update_tree(min_tree, b.l, b.r, -1);
}
vector <Block> block_tree[N_MAX * 4 + 2];
void add_blocks (int node, int l, int r, int i, vector <Block> &blocks) {
if (l != r) {
int mid = (l + r) / 2;
int left = node * 2, right = node * 2 + 1;
if (i <= mid) {
add_blocks(left, l, mid, i, blocks);
} else {
add_blocks(right, mid + 1, r, i, blocks);
}
}
while (blocks.empty() == false && l <= blocks.back().l && blocks.back().r <= r) {
add_block(blocks.back());
block_tree[node].push_back(blocks.back());
blocks.pop_back();
}
}
void add_blocks (int i, vector <Block> &blocks) {
add_blocks(1, 1, N, i, blocks);
}
void del_blocks (int node, int l, int r, int i) {
while (block_tree[node].empty() == false && block_tree[node].back().contains(i)) {
del_block(block_tree[node].back());
block_tree[node].pop_back();
}
if (l != r) {
int mid = (l + r) / 2;
int left = node * 2, right = node * 2 + 1;
if (i <= mid) {
del_blocks(left, l, mid, i);
} else {
del_blocks(right, mid + 1, r, i);
}
}
}
void del_blocks (int i) {
del_blocks(1, 1, N, i);
}
ll Fen[N_MAX + 2];
void update_Fen (int pos, ll val) {
for (int i = pos; i <= N; i += i & -i) {
Fen[i] += val;
}
}
ll query_Fen (int pos) {
ll sum = 0;
for (int i = pos; i >= 1; i -= i & -i) {
sum += Fen[i];
}
return sum;
}
ll query_Fen (int l, int r) {
return (l <= r ? query_Fen(r) - query_Fen(l - 1) : 0);
}
SegInfo max_tree[N_MAX * 4];
vector <Block> find_blocks (int i) {
vector <Block> blocks;
vector <int> ls, rs;
int j; ll sum;
j = i; sum = 0;
while (j > 1) {
sum += A[j];
j = query_last(max_tree, j - 1, -(sum + 1));
ls.push_back(j + 1);
}
j = i; sum = 0;
while (j < N) {
sum += A[j];
j = query_first(max_tree, j + 1, -(sum + 1));
rs.push_back(j - 1);
}
for (int l : ls) {
for (int r : rs) {
ll sum = query_Fen(l, r);
if (sum < A[l - 1] && sum < A[r + 1]) {
blocks.push_back(Block{l, r});
}
}
}
return blocks;
}
void add_blocks (int i) {
vector <Block> blocks = find_blocks(i);
reverse(blocks.begin(), blocks.end());
add_blocks(i, blocks);
}
SegInfo A_tree[N_MAX * 4 + 2];
SegInfo B_tree[N_MAX * 4 + 2];
void update (int i, ll a) {
update_Fen(i, a - A[i]);
update_tree(max_tree, i, -(a - A[i]));
update_tree(A_tree, i, -a - (-A[i]));
if (i + 1 <= N) {
update_tree(A_tree, i + 1, N, a - A[i]);
}
update_tree(B_tree, i, -a - (-A[i]));
if (1 <= i - 1) {
update_tree(B_tree, 1, i - 1, a - A[i]);
}
A[i] = a;
del_blocks(i);
add_blocks(i);
if (i - 1 >= 1) {
del_blocks(i - 1);
add_blocks(i - 1);
}
if (i + 1 <= N) {
del_blocks(i + 1);
add_blocks(i + 1);
}
}
int query (int l, int r) {
l = max(l, query_last(A_tree, r, query_Fen(1, l - 1) - 1));
r = min(r, query_first(B_tree, l, query_Fen(r + 1, N) - 1));
return query_cnt(min_tree, l, r);
}
int Q;
int main () {
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> N;
build_tree(min_tree);
build_tree(max_tree);
for (int i = 1; i <= N; i++) {
ll a; cin >> a;
update(i, a);
}
cin >> Q;
while (Q--) {
int type;
cin >> type;
if (type == 1) {
int i; ll a; cin >> i >> a;
update(i, a);
} else {
int l, r;
cin >> l >> r;
cout << query(l, r) << "\n";
}
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
14684 KB |
Output is correct |
2 |
Correct |
3 ms |
14684 KB |
Output is correct |
3 |
Correct |
4 ms |
14772 KB |
Output is correct |
4 |
Correct |
3 ms |
14684 KB |
Output is correct |
5 |
Correct |
6 ms |
14684 KB |
Output is correct |
6 |
Correct |
5 ms |
14844 KB |
Output is correct |
7 |
Correct |
7 ms |
14684 KB |
Output is correct |
8 |
Correct |
6 ms |
14680 KB |
Output is correct |
9 |
Correct |
5 ms |
14684 KB |
Output is correct |
10 |
Correct |
5 ms |
14912 KB |
Output is correct |
11 |
Correct |
4 ms |
14684 KB |
Output is correct |
12 |
Correct |
6 ms |
14784 KB |
Output is correct |
13 |
Correct |
5 ms |
14684 KB |
Output is correct |
14 |
Correct |
5 ms |
14908 KB |
Output is correct |
15 |
Correct |
7 ms |
14684 KB |
Output is correct |
16 |
Correct |
5 ms |
14684 KB |
Output is correct |
17 |
Correct |
6 ms |
14684 KB |
Output is correct |
18 |
Correct |
5 ms |
14828 KB |
Output is correct |
19 |
Correct |
5 ms |
14684 KB |
Output is correct |
20 |
Correct |
4 ms |
14684 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
14684 KB |
Output is correct |
2 |
Correct |
327 ms |
42968 KB |
Output is correct |
3 |
Correct |
382 ms |
43092 KB |
Output is correct |
4 |
Correct |
330 ms |
43076 KB |
Output is correct |
5 |
Correct |
390 ms |
43120 KB |
Output is correct |
6 |
Correct |
261 ms |
43556 KB |
Output is correct |
7 |
Correct |
461 ms |
42252 KB |
Output is correct |
8 |
Correct |
261 ms |
43740 KB |
Output is correct |
9 |
Correct |
501 ms |
42244 KB |
Output is correct |
10 |
Correct |
511 ms |
42352 KB |
Output is correct |
11 |
Correct |
560 ms |
42756 KB |
Output is correct |
12 |
Correct |
305 ms |
42812 KB |
Output is correct |
13 |
Correct |
308 ms |
42760 KB |
Output is correct |
14 |
Correct |
294 ms |
43860 KB |
Output is correct |
15 |
Correct |
297 ms |
43888 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
14684 KB |
Output is correct |
2 |
Correct |
3 ms |
14684 KB |
Output is correct |
3 |
Correct |
4 ms |
14772 KB |
Output is correct |
4 |
Correct |
3 ms |
14684 KB |
Output is correct |
5 |
Correct |
6 ms |
14684 KB |
Output is correct |
6 |
Correct |
5 ms |
14844 KB |
Output is correct |
7 |
Correct |
7 ms |
14684 KB |
Output is correct |
8 |
Correct |
6 ms |
14680 KB |
Output is correct |
9 |
Correct |
5 ms |
14684 KB |
Output is correct |
10 |
Correct |
5 ms |
14912 KB |
Output is correct |
11 |
Correct |
4 ms |
14684 KB |
Output is correct |
12 |
Correct |
6 ms |
14784 KB |
Output is correct |
13 |
Correct |
5 ms |
14684 KB |
Output is correct |
14 |
Correct |
5 ms |
14908 KB |
Output is correct |
15 |
Correct |
7 ms |
14684 KB |
Output is correct |
16 |
Correct |
5 ms |
14684 KB |
Output is correct |
17 |
Correct |
6 ms |
14684 KB |
Output is correct |
18 |
Correct |
5 ms |
14828 KB |
Output is correct |
19 |
Correct |
5 ms |
14684 KB |
Output is correct |
20 |
Correct |
4 ms |
14684 KB |
Output is correct |
21 |
Correct |
3 ms |
14684 KB |
Output is correct |
22 |
Correct |
327 ms |
42968 KB |
Output is correct |
23 |
Correct |
382 ms |
43092 KB |
Output is correct |
24 |
Correct |
330 ms |
43076 KB |
Output is correct |
25 |
Correct |
390 ms |
43120 KB |
Output is correct |
26 |
Correct |
261 ms |
43556 KB |
Output is correct |
27 |
Correct |
461 ms |
42252 KB |
Output is correct |
28 |
Correct |
261 ms |
43740 KB |
Output is correct |
29 |
Correct |
501 ms |
42244 KB |
Output is correct |
30 |
Correct |
511 ms |
42352 KB |
Output is correct |
31 |
Correct |
560 ms |
42756 KB |
Output is correct |
32 |
Correct |
305 ms |
42812 KB |
Output is correct |
33 |
Correct |
308 ms |
42760 KB |
Output is correct |
34 |
Correct |
294 ms |
43860 KB |
Output is correct |
35 |
Correct |
297 ms |
43888 KB |
Output is correct |
36 |
Correct |
275 ms |
43376 KB |
Output is correct |
37 |
Correct |
390 ms |
43128 KB |
Output is correct |
38 |
Correct |
379 ms |
42896 KB |
Output is correct |
39 |
Correct |
283 ms |
43236 KB |
Output is correct |
40 |
Correct |
382 ms |
43040 KB |
Output is correct |
41 |
Correct |
258 ms |
43604 KB |
Output is correct |
42 |
Correct |
271 ms |
44064 KB |
Output is correct |
43 |
Correct |
452 ms |
42372 KB |
Output is correct |
44 |
Correct |
457 ms |
42488 KB |
Output is correct |
45 |
Correct |
497 ms |
42564 KB |
Output is correct |
46 |
Correct |
505 ms |
42544 KB |
Output is correct |
47 |
Correct |
561 ms |
42124 KB |
Output is correct |
48 |
Correct |
317 ms |
42836 KB |
Output is correct |
49 |
Correct |
295 ms |
42960 KB |
Output is correct |
50 |
Correct |
312 ms |
44096 KB |
Output is correct |
51 |
Correct |
300 ms |
43956 KB |
Output is correct |
52 |
Correct |
295 ms |
44116 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
14684 KB |
Output is correct |
2 |
Correct |
327 ms |
42968 KB |
Output is correct |
3 |
Correct |
382 ms |
43092 KB |
Output is correct |
4 |
Correct |
330 ms |
43076 KB |
Output is correct |
5 |
Correct |
390 ms |
43120 KB |
Output is correct |
6 |
Correct |
261 ms |
43556 KB |
Output is correct |
7 |
Correct |
461 ms |
42252 KB |
Output is correct |
8 |
Correct |
261 ms |
43740 KB |
Output is correct |
9 |
Correct |
501 ms |
42244 KB |
Output is correct |
10 |
Correct |
511 ms |
42352 KB |
Output is correct |
11 |
Correct |
560 ms |
42756 KB |
Output is correct |
12 |
Correct |
305 ms |
42812 KB |
Output is correct |
13 |
Correct |
308 ms |
42760 KB |
Output is correct |
14 |
Correct |
294 ms |
43860 KB |
Output is correct |
15 |
Correct |
297 ms |
43888 KB |
Output is correct |
16 |
Correct |
3 ms |
14684 KB |
Output is correct |
17 |
Correct |
480 ms |
44892 KB |
Output is correct |
18 |
Correct |
384 ms |
44884 KB |
Output is correct |
19 |
Correct |
497 ms |
44744 KB |
Output is correct |
20 |
Correct |
479 ms |
44884 KB |
Output is correct |
21 |
Correct |
488 ms |
44624 KB |
Output is correct |
22 |
Correct |
383 ms |
45196 KB |
Output is correct |
23 |
Correct |
500 ms |
44624 KB |
Output is correct |
24 |
Correct |
483 ms |
44948 KB |
Output is correct |
25 |
Correct |
483 ms |
44844 KB |
Output is correct |
26 |
Correct |
499 ms |
44884 KB |
Output is correct |
27 |
Correct |
425 ms |
45584 KB |
Output is correct |
28 |
Correct |
395 ms |
45636 KB |
Output is correct |
29 |
Correct |
392 ms |
45644 KB |
Output is correct |
30 |
Correct |
542 ms |
43772 KB |
Output is correct |
31 |
Correct |
523 ms |
43772 KB |
Output is correct |
32 |
Correct |
636 ms |
44132 KB |
Output is correct |
33 |
Correct |
603 ms |
44368 KB |
Output is correct |
34 |
Correct |
635 ms |
43960 KB |
Output is correct |
35 |
Correct |
636 ms |
43636 KB |
Output is correct |
36 |
Correct |
636 ms |
44380 KB |
Output is correct |
37 |
Correct |
380 ms |
44624 KB |
Output is correct |
38 |
Correct |
406 ms |
44328 KB |
Output is correct |
39 |
Correct |
424 ms |
45964 KB |
Output is correct |
40 |
Correct |
406 ms |
45568 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
14684 KB |
Output is correct |
2 |
Correct |
327 ms |
42968 KB |
Output is correct |
3 |
Correct |
382 ms |
43092 KB |
Output is correct |
4 |
Correct |
330 ms |
43076 KB |
Output is correct |
5 |
Correct |
390 ms |
43120 KB |
Output is correct |
6 |
Correct |
261 ms |
43556 KB |
Output is correct |
7 |
Correct |
461 ms |
42252 KB |
Output is correct |
8 |
Correct |
261 ms |
43740 KB |
Output is correct |
9 |
Correct |
501 ms |
42244 KB |
Output is correct |
10 |
Correct |
511 ms |
42352 KB |
Output is correct |
11 |
Correct |
560 ms |
42756 KB |
Output is correct |
12 |
Correct |
305 ms |
42812 KB |
Output is correct |
13 |
Correct |
308 ms |
42760 KB |
Output is correct |
14 |
Correct |
294 ms |
43860 KB |
Output is correct |
15 |
Correct |
297 ms |
43888 KB |
Output is correct |
16 |
Correct |
3 ms |
14680 KB |
Output is correct |
17 |
Correct |
1453 ms |
44436 KB |
Output is correct |
18 |
Correct |
1225 ms |
47544 KB |
Output is correct |
19 |
Correct |
1114 ms |
44548 KB |
Output is correct |
20 |
Correct |
1053 ms |
47000 KB |
Output is correct |
21 |
Correct |
2004 ms |
44632 KB |
Output is correct |
22 |
Correct |
1239 ms |
47596 KB |
Output is correct |
23 |
Correct |
1640 ms |
44604 KB |
Output is correct |
24 |
Correct |
1152 ms |
47396 KB |
Output is correct |
25 |
Correct |
1464 ms |
44556 KB |
Output is correct |
26 |
Correct |
632 ms |
46116 KB |
Output is correct |
27 |
Correct |
796 ms |
46524 KB |
Output is correct |
28 |
Correct |
1029 ms |
45988 KB |
Output is correct |
29 |
Correct |
677 ms |
46316 KB |
Output is correct |
30 |
Correct |
805 ms |
46576 KB |
Output is correct |
31 |
Correct |
1175 ms |
46364 KB |
Output is correct |
32 |
Correct |
1371 ms |
46996 KB |
Output is correct |
33 |
Correct |
1069 ms |
43628 KB |
Output is correct |
34 |
Correct |
1230 ms |
47428 KB |
Output is correct |
35 |
Correct |
891 ms |
43904 KB |
Output is correct |
36 |
Correct |
1242 ms |
46568 KB |
Output is correct |
37 |
Correct |
1014 ms |
45516 KB |
Output is correct |
38 |
Correct |
768 ms |
45092 KB |
Output is correct |
39 |
Correct |
745 ms |
46560 KB |
Output is correct |
40 |
Correct |
535 ms |
45900 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
14684 KB |
Output is correct |
2 |
Correct |
3 ms |
14684 KB |
Output is correct |
3 |
Correct |
4 ms |
14772 KB |
Output is correct |
4 |
Correct |
3 ms |
14684 KB |
Output is correct |
5 |
Correct |
6 ms |
14684 KB |
Output is correct |
6 |
Correct |
5 ms |
14844 KB |
Output is correct |
7 |
Correct |
7 ms |
14684 KB |
Output is correct |
8 |
Correct |
6 ms |
14680 KB |
Output is correct |
9 |
Correct |
5 ms |
14684 KB |
Output is correct |
10 |
Correct |
5 ms |
14912 KB |
Output is correct |
11 |
Correct |
4 ms |
14684 KB |
Output is correct |
12 |
Correct |
6 ms |
14784 KB |
Output is correct |
13 |
Correct |
5 ms |
14684 KB |
Output is correct |
14 |
Correct |
5 ms |
14908 KB |
Output is correct |
15 |
Correct |
7 ms |
14684 KB |
Output is correct |
16 |
Correct |
5 ms |
14684 KB |
Output is correct |
17 |
Correct |
6 ms |
14684 KB |
Output is correct |
18 |
Correct |
5 ms |
14828 KB |
Output is correct |
19 |
Correct |
5 ms |
14684 KB |
Output is correct |
20 |
Correct |
4 ms |
14684 KB |
Output is correct |
21 |
Correct |
3 ms |
14684 KB |
Output is correct |
22 |
Correct |
327 ms |
42968 KB |
Output is correct |
23 |
Correct |
382 ms |
43092 KB |
Output is correct |
24 |
Correct |
330 ms |
43076 KB |
Output is correct |
25 |
Correct |
390 ms |
43120 KB |
Output is correct |
26 |
Correct |
261 ms |
43556 KB |
Output is correct |
27 |
Correct |
461 ms |
42252 KB |
Output is correct |
28 |
Correct |
261 ms |
43740 KB |
Output is correct |
29 |
Correct |
501 ms |
42244 KB |
Output is correct |
30 |
Correct |
511 ms |
42352 KB |
Output is correct |
31 |
Correct |
560 ms |
42756 KB |
Output is correct |
32 |
Correct |
305 ms |
42812 KB |
Output is correct |
33 |
Correct |
308 ms |
42760 KB |
Output is correct |
34 |
Correct |
294 ms |
43860 KB |
Output is correct |
35 |
Correct |
297 ms |
43888 KB |
Output is correct |
36 |
Correct |
275 ms |
43376 KB |
Output is correct |
37 |
Correct |
390 ms |
43128 KB |
Output is correct |
38 |
Correct |
379 ms |
42896 KB |
Output is correct |
39 |
Correct |
283 ms |
43236 KB |
Output is correct |
40 |
Correct |
382 ms |
43040 KB |
Output is correct |
41 |
Correct |
258 ms |
43604 KB |
Output is correct |
42 |
Correct |
271 ms |
44064 KB |
Output is correct |
43 |
Correct |
452 ms |
42372 KB |
Output is correct |
44 |
Correct |
457 ms |
42488 KB |
Output is correct |
45 |
Correct |
497 ms |
42564 KB |
Output is correct |
46 |
Correct |
505 ms |
42544 KB |
Output is correct |
47 |
Correct |
561 ms |
42124 KB |
Output is correct |
48 |
Correct |
317 ms |
42836 KB |
Output is correct |
49 |
Correct |
295 ms |
42960 KB |
Output is correct |
50 |
Correct |
312 ms |
44096 KB |
Output is correct |
51 |
Correct |
300 ms |
43956 KB |
Output is correct |
52 |
Correct |
295 ms |
44116 KB |
Output is correct |
53 |
Correct |
3 ms |
14684 KB |
Output is correct |
54 |
Correct |
480 ms |
44892 KB |
Output is correct |
55 |
Correct |
384 ms |
44884 KB |
Output is correct |
56 |
Correct |
497 ms |
44744 KB |
Output is correct |
57 |
Correct |
479 ms |
44884 KB |
Output is correct |
58 |
Correct |
488 ms |
44624 KB |
Output is correct |
59 |
Correct |
383 ms |
45196 KB |
Output is correct |
60 |
Correct |
500 ms |
44624 KB |
Output is correct |
61 |
Correct |
483 ms |
44948 KB |
Output is correct |
62 |
Correct |
483 ms |
44844 KB |
Output is correct |
63 |
Correct |
499 ms |
44884 KB |
Output is correct |
64 |
Correct |
425 ms |
45584 KB |
Output is correct |
65 |
Correct |
395 ms |
45636 KB |
Output is correct |
66 |
Correct |
392 ms |
45644 KB |
Output is correct |
67 |
Correct |
542 ms |
43772 KB |
Output is correct |
68 |
Correct |
523 ms |
43772 KB |
Output is correct |
69 |
Correct |
636 ms |
44132 KB |
Output is correct |
70 |
Correct |
603 ms |
44368 KB |
Output is correct |
71 |
Correct |
635 ms |
43960 KB |
Output is correct |
72 |
Correct |
636 ms |
43636 KB |
Output is correct |
73 |
Correct |
636 ms |
44380 KB |
Output is correct |
74 |
Correct |
380 ms |
44624 KB |
Output is correct |
75 |
Correct |
406 ms |
44328 KB |
Output is correct |
76 |
Correct |
424 ms |
45964 KB |
Output is correct |
77 |
Correct |
406 ms |
45568 KB |
Output is correct |
78 |
Correct |
3 ms |
14680 KB |
Output is correct |
79 |
Correct |
1453 ms |
44436 KB |
Output is correct |
80 |
Correct |
1225 ms |
47544 KB |
Output is correct |
81 |
Correct |
1114 ms |
44548 KB |
Output is correct |
82 |
Correct |
1053 ms |
47000 KB |
Output is correct |
83 |
Correct |
2004 ms |
44632 KB |
Output is correct |
84 |
Correct |
1239 ms |
47596 KB |
Output is correct |
85 |
Correct |
1640 ms |
44604 KB |
Output is correct |
86 |
Correct |
1152 ms |
47396 KB |
Output is correct |
87 |
Correct |
1464 ms |
44556 KB |
Output is correct |
88 |
Correct |
632 ms |
46116 KB |
Output is correct |
89 |
Correct |
796 ms |
46524 KB |
Output is correct |
90 |
Correct |
1029 ms |
45988 KB |
Output is correct |
91 |
Correct |
677 ms |
46316 KB |
Output is correct |
92 |
Correct |
805 ms |
46576 KB |
Output is correct |
93 |
Correct |
1175 ms |
46364 KB |
Output is correct |
94 |
Correct |
1371 ms |
46996 KB |
Output is correct |
95 |
Correct |
1069 ms |
43628 KB |
Output is correct |
96 |
Correct |
1230 ms |
47428 KB |
Output is correct |
97 |
Correct |
891 ms |
43904 KB |
Output is correct |
98 |
Correct |
1242 ms |
46568 KB |
Output is correct |
99 |
Correct |
1014 ms |
45516 KB |
Output is correct |
100 |
Correct |
768 ms |
45092 KB |
Output is correct |
101 |
Correct |
745 ms |
46560 KB |
Output is correct |
102 |
Correct |
535 ms |
45900 KB |
Output is correct |
103 |
Correct |
1375 ms |
43960 KB |
Output is correct |
104 |
Correct |
1105 ms |
48104 KB |
Output is correct |
105 |
Correct |
605 ms |
44788 KB |
Output is correct |
106 |
Correct |
622 ms |
45652 KB |
Output is correct |
107 |
Correct |
1813 ms |
44332 KB |
Output is correct |
108 |
Correct |
1086 ms |
48120 KB |
Output is correct |
109 |
Correct |
922 ms |
44864 KB |
Output is correct |
110 |
Correct |
860 ms |
46700 KB |
Output is correct |
111 |
Correct |
695 ms |
45024 KB |
Output is correct |
112 |
Correct |
693 ms |
45592 KB |
Output is correct |
113 |
Correct |
769 ms |
46256 KB |
Output is correct |
114 |
Correct |
499 ms |
45768 KB |
Output is correct |
115 |
Correct |
1286 ms |
46612 KB |
Output is correct |
116 |
Correct |
987 ms |
45452 KB |
Output is correct |
117 |
Correct |
551 ms |
45908 KB |
Output is correct |
118 |
Correct |
727 ms |
44640 KB |
Output is correct |
119 |
Correct |
858 ms |
46616 KB |
Output is correct |
120 |
Correct |
1173 ms |
46148 KB |
Output is correct |
121 |
Correct |
895 ms |
45216 KB |
Output is correct |
122 |
Correct |
1395 ms |
46900 KB |
Output is correct |
123 |
Correct |
961 ms |
43628 KB |
Output is correct |
124 |
Correct |
905 ms |
44860 KB |
Output is correct |
125 |
Correct |
686 ms |
43704 KB |
Output is correct |
126 |
Correct |
800 ms |
44536 KB |
Output is correct |
127 |
Correct |
1039 ms |
45600 KB |
Output is correct |
128 |
Correct |
509 ms |
44752 KB |
Output is correct |
129 |
Correct |
820 ms |
46700 KB |
Output is correct |
130 |
Correct |
540 ms |
46112 KB |
Output is correct |