#include <stdio.h>
#include <string.h>
#define N 100000
#define N_ (1 << 17) /* N_ = pow2(ceil(log2(N + 1))) */
#define INF 0x7fffffff
#define LG 30
int min(int a, int b) { return a < b ? a : b; }
int max(int a, int b) { return a > b ? a : b; }
int aa[N], st1[N_ * 2], st2[N_ * 2], kk2[N_ * 2], lz2[N_], h_, n_;
void pul1(int i) {
st1[i] = st1[i << 1 | 0] <= INF - st1[i << 1 | 1] ? st1[i << 1 | 0] + st1[i << 1 | 1] : INF;
}
void update1(int i, int a) {
i += n_;
st1[i] = a;
while (i > 1)
pul1(i >>= 1);
}
int queryl1(int r, int s) {
int l = 0;
for (l += n_, r += n_; l <= r; l >>= 1, r >>= 1)
if ((r & 1) == 0) {
if (s > st1[r])
s -= st1[r--];
else {
while (r < n_)
if (s <= st1[r << 1 | 1])
r = r << 1 | 1;
else
s -= st1[r << 1 | 1], r = r << 1 | 0;
return r - n_;
}
}
return -1;
}
int queryr1(int l, int s) {
int r = n_ - 1;
for (l += n_, r += n_; l <= r; l >>= 1, r >>= 1)
if ((l & 1) == 1) {
if (s > st1[l])
s -= st1[l++];
else {
while (l < n_)
if (s <= st1[l << 1 | 0])
l = l << 1 | 0;
else
s -= st1[l << 1 | 0], l = l << 1 | 1;
return l - n_;
}
}
return n_;
}
void put2(int i, int x) {
st2[i] += x;
if (i < n_)
lz2[i] += x;
}
void pus2(int i) {
if (lz2[i])
put2(i << 1 | 0, lz2[i]), put2(i << 1 | 1, lz2[i]), lz2[i] = 0;
}
void pul2(int i) {
if (!lz2[i]) {
int l = i << 1, r = l | 1;
if (st2[l] < st2[r])
st2[i] = st2[l], kk2[i] = kk2[l];
else if (st2[l] > st2[r])
st2[i] = st2[r], kk2[i] = kk2[r];
else
st2[i] = st2[l], kk2[i] = kk2[l] + kk2[r];
}
}
void push2(int i) {
int h;
for (h = h_; h > 0; h--)
pus2(i >> h);
}
void pull2(int i) {
while (i > 1)
pul2(i >>= 1);
}
void update2(int l, int r, int x) {
int l_ = l += n_, r_ = r += n_;
if (l > r)
return;
push2(l_), push2(r_);
for ( ; l <= r; l >>= 1, r >>= 1) {
if ((l & 1) == 1)
put2(l++, x);
if ((r & 1) == 0)
put2(r--, x);
}
pull2(l_), pull2(r_);
}
int query2(int l, int r) {
int x = INF, k = 0;
push2(l += n_), push2(r += n_);
for ( ; l <= r; l >>= 1, r >>= 1) {
if ((l & 1) == 1) {
if (x > st2[l])
x = st2[l], k = 0;
if (x == st2[l])
k += kk2[l];
l++;
}
if ((r & 1) == 0) {
if (x > st2[r])
x = st2[r], k = 0;
if (x == st2[r])
k += kk2[r];
r--;
}
}
return x == 0 ? k : 0;
}
int ll[N], rr[N];
void updl(int l, int i, int x) {
if (ll[i] < l || aa[ll[i]] > aa[i])
update2(ll[i] + 1, i - 1, x);
}
void updr(int r, int i, int x) {
if (rr[i] > r || aa[rr[i]] >= aa[i])
update2(i + 1, rr[i] - 1, x);
}
void upd(int l, int r, int i, int x) {
updl(l, i, x), updr(r, i, x);
}
void build(int *aa, int n) {
int i;
h_ = 0;
while (1 << h_ <= n)
h_++;
n_ = 1 << h_;
for (i = 0; i < n; i++)
st1[n_ + i] = aa[i], kk2[n_ + i] = 1;
for (i = n_ - 1; i > 0; i--)
pul1(i), pul2(i);
}
int main() {
int n, q, i, j;
scanf("%d", &n);
for (i = 0; i < n; i++)
scanf("%d", &aa[i]);
build(aa, n);
scanf("%d", &q);
for (i = 0; i < n; i++) {
ll[i] = queryl1(i - 1, aa[i]), rr[i] = queryr1(i + 1, aa[i]);
updl(0, i, 1), updr(n - 1, i, 1);
}
while (q--) {
static char used[N];
static int qu[N];
int t, a, l, l_, r, r_, lg, cnt, h;
scanf("%d", &t);
if (t == 1) {
int j;
scanf("%d%d", &i, &a), i--;
cnt = 0;
qu[cnt++] = i;
for (lg = 0; lg <= LG; lg++) {
j = queryl1(i - 1, 1 << lg);
if (j >= 0 && !used[j])
used[j] = 1, qu[cnt++] = j;
j = queryr1(i + 1, 1 << lg);
if (j < n && !used[j])
used[j] = 1, qu[cnt++] = j;
}
for (h = 0; h < cnt; h++) {
if (qu[h] <= i)
updr(n - 1, qu[h], -1);
if (qu[h] >= i)
updl(0, qu[h], -1);
}
aa[i] = a, update1(i, a);
for (h = 0; h < cnt; h++) {
if (qu[h] <= i) {
rr[qu[h]] = queryr1(qu[h] + 1, aa[qu[h]]);
updr(n - 1, qu[h], 1);
}
if (qu[h] >= i) {
ll[qu[h]] = queryl1(qu[h] - 1, aa[qu[h]]);
updl(0, qu[h], 1);
}
used[qu[h]] = 0;
}
} else {
scanf("%d%d", &l, &r), l--, r--;
cnt = 0;
for (lg = 0; lg <= LG; lg++) {
j = queryl1(l - 1, 1 << lg);
if (j >= 0 && !used[j])
used[j] = 1, qu[cnt++] = j;
j = queryr1(l, 1 << lg);
if (j < n && !used[j])
used[j] = 1, qu[cnt++] = j;
j = queryl1(r, 1 << lg);
if (j >= 0 && !used[j])
used[j] = 1, qu[cnt++] = j;
j = queryr1(r + 1, 1 << lg);
if (j < n && !used[j])
used[j] = 1, qu[cnt++] = j;
}
l_ = l, r_ = r;
for (h = 0; h < cnt; h++)
if (qu[h] < l)
updr(n - 1, qu[h], -1);
else if (qu[h] > r)
updl(0, qu[h], -1);
else {
if (ll[qu[h]] < l)
l_ = max(l_, qu[h]);
if (rr[qu[h]] > r)
r_ = min(r_, qu[h]);
}
printf("%d\n", l_ > r_ ? 0 : query2(l_, r_));
for (h = 0; h < cnt; h++)
if (qu[h] < l)
updr(n - 1, qu[h], 1);
else if (qu[h] > r)
updl(0, qu[h], 1);
for (h = 0; h < cnt; h++)
used[qu[h]] = 0;
}
}
return 0;
}
Compilation message
fish2.c: In function 'main':
fish2.c:169:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
169 | scanf("%d", &n);
| ^~~~~~~~~~~~~~~
fish2.c:171:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
171 | scanf("%d", &aa[i]);
| ^~~~~~~~~~~~~~~~~~~
fish2.c:173:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
173 | scanf("%d", &q);
| ^~~~~~~~~~~~~~~
fish2.c:183:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
183 | scanf("%d", &t);
| ^~~~~~~~~~~~~~~
fish2.c:187:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
187 | scanf("%d%d", &i, &a), i--;
| ^~~~~~~~~~~~~~~~~~~~~
fish2.c:217:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
217 | scanf("%d%d", &l, &r), l--, r--;
| ^~~~~~~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
328 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 |
4 ms |
340 KB |
Output is correct |
6 |
Correct |
3 ms |
340 KB |
Output is correct |
7 |
Correct |
4 ms |
340 KB |
Output is correct |
8 |
Correct |
6 ms |
340 KB |
Output is correct |
9 |
Correct |
3 ms |
340 KB |
Output is correct |
10 |
Correct |
2 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
2 ms |
340 KB |
Output is correct |
13 |
Correct |
4 ms |
340 KB |
Output is correct |
14 |
Correct |
2 ms |
340 KB |
Output is correct |
15 |
Correct |
3 ms |
352 KB |
Output is correct |
16 |
Correct |
2 ms |
340 KB |
Output is correct |
17 |
Correct |
3 ms |
340 KB |
Output is correct |
18 |
Correct |
3 ms |
340 KB |
Output is correct |
19 |
Correct |
2 ms |
340 KB |
Output is correct |
20 |
Correct |
3 ms |
340 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
40 ms |
4552 KB |
Output is correct |
3 |
Correct |
42 ms |
4572 KB |
Output is correct |
4 |
Correct |
41 ms |
4556 KB |
Output is correct |
5 |
Correct |
40 ms |
4496 KB |
Output is correct |
6 |
Correct |
28 ms |
4400 KB |
Output is correct |
7 |
Correct |
22 ms |
4556 KB |
Output is correct |
8 |
Correct |
34 ms |
4448 KB |
Output is correct |
9 |
Correct |
22 ms |
4540 KB |
Output is correct |
10 |
Correct |
31 ms |
4572 KB |
Output is correct |
11 |
Correct |
27 ms |
4560 KB |
Output is correct |
12 |
Correct |
25 ms |
4560 KB |
Output is correct |
13 |
Correct |
24 ms |
4540 KB |
Output is correct |
14 |
Correct |
33 ms |
4512 KB |
Output is correct |
15 |
Correct |
33 ms |
4496 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
328 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 |
4 ms |
340 KB |
Output is correct |
6 |
Correct |
3 ms |
340 KB |
Output is correct |
7 |
Correct |
4 ms |
340 KB |
Output is correct |
8 |
Correct |
6 ms |
340 KB |
Output is correct |
9 |
Correct |
3 ms |
340 KB |
Output is correct |
10 |
Correct |
2 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
2 ms |
340 KB |
Output is correct |
13 |
Correct |
4 ms |
340 KB |
Output is correct |
14 |
Correct |
2 ms |
340 KB |
Output is correct |
15 |
Correct |
3 ms |
352 KB |
Output is correct |
16 |
Correct |
2 ms |
340 KB |
Output is correct |
17 |
Correct |
3 ms |
340 KB |
Output is correct |
18 |
Correct |
3 ms |
340 KB |
Output is correct |
19 |
Correct |
2 ms |
340 KB |
Output is correct |
20 |
Correct |
3 ms |
340 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
40 ms |
4552 KB |
Output is correct |
23 |
Correct |
42 ms |
4572 KB |
Output is correct |
24 |
Correct |
41 ms |
4556 KB |
Output is correct |
25 |
Correct |
40 ms |
4496 KB |
Output is correct |
26 |
Correct |
28 ms |
4400 KB |
Output is correct |
27 |
Correct |
22 ms |
4556 KB |
Output is correct |
28 |
Correct |
34 ms |
4448 KB |
Output is correct |
29 |
Correct |
22 ms |
4540 KB |
Output is correct |
30 |
Correct |
31 ms |
4572 KB |
Output is correct |
31 |
Correct |
27 ms |
4560 KB |
Output is correct |
32 |
Correct |
25 ms |
4560 KB |
Output is correct |
33 |
Correct |
24 ms |
4540 KB |
Output is correct |
34 |
Correct |
33 ms |
4512 KB |
Output is correct |
35 |
Correct |
33 ms |
4496 KB |
Output is correct |
36 |
Correct |
54 ms |
4656 KB |
Output is correct |
37 |
Correct |
54 ms |
4592 KB |
Output is correct |
38 |
Correct |
46 ms |
4660 KB |
Output is correct |
39 |
Correct |
56 ms |
4660 KB |
Output is correct |
40 |
Correct |
49 ms |
4572 KB |
Output is correct |
41 |
Correct |
30 ms |
4628 KB |
Output is correct |
42 |
Correct |
33 ms |
4592 KB |
Output is correct |
43 |
Correct |
37 ms |
4692 KB |
Output is correct |
44 |
Correct |
39 ms |
4568 KB |
Output is correct |
45 |
Correct |
45 ms |
4616 KB |
Output is correct |
46 |
Correct |
35 ms |
4648 KB |
Output is correct |
47 |
Correct |
30 ms |
4688 KB |
Output is correct |
48 |
Correct |
35 ms |
4688 KB |
Output is correct |
49 |
Correct |
37 ms |
4692 KB |
Output is correct |
50 |
Correct |
36 ms |
4620 KB |
Output is correct |
51 |
Correct |
39 ms |
4528 KB |
Output is correct |
52 |
Correct |
34 ms |
4644 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
40 ms |
4552 KB |
Output is correct |
3 |
Correct |
42 ms |
4572 KB |
Output is correct |
4 |
Correct |
41 ms |
4556 KB |
Output is correct |
5 |
Correct |
40 ms |
4496 KB |
Output is correct |
6 |
Correct |
28 ms |
4400 KB |
Output is correct |
7 |
Correct |
22 ms |
4556 KB |
Output is correct |
8 |
Correct |
34 ms |
4448 KB |
Output is correct |
9 |
Correct |
22 ms |
4540 KB |
Output is correct |
10 |
Correct |
31 ms |
4572 KB |
Output is correct |
11 |
Correct |
27 ms |
4560 KB |
Output is correct |
12 |
Correct |
25 ms |
4560 KB |
Output is correct |
13 |
Correct |
24 ms |
4540 KB |
Output is correct |
14 |
Correct |
33 ms |
4512 KB |
Output is correct |
15 |
Correct |
33 ms |
4496 KB |
Output is correct |
16 |
Correct |
1 ms |
212 KB |
Output is correct |
17 |
Correct |
931 ms |
5168 KB |
Output is correct |
18 |
Correct |
866 ms |
7148 KB |
Output is correct |
19 |
Correct |
933 ms |
6700 KB |
Output is correct |
20 |
Correct |
1429 ms |
6732 KB |
Output is correct |
21 |
Correct |
925 ms |
6620 KB |
Output is correct |
22 |
Correct |
857 ms |
7272 KB |
Output is correct |
23 |
Correct |
1022 ms |
6880 KB |
Output is correct |
24 |
Correct |
1393 ms |
6848 KB |
Output is correct |
25 |
Correct |
959 ms |
6724 KB |
Output is correct |
26 |
Correct |
1396 ms |
6664 KB |
Output is correct |
27 |
Correct |
259 ms |
7424 KB |
Output is correct |
28 |
Correct |
255 ms |
7432 KB |
Output is correct |
29 |
Correct |
257 ms |
7456 KB |
Output is correct |
30 |
Correct |
1761 ms |
6528 KB |
Output is correct |
31 |
Correct |
1841 ms |
6604 KB |
Output is correct |
32 |
Correct |
2039 ms |
6684 KB |
Output is correct |
33 |
Correct |
545 ms |
7116 KB |
Output is correct |
34 |
Correct |
2023 ms |
6660 KB |
Output is correct |
35 |
Correct |
1097 ms |
6824 KB |
Output is correct |
36 |
Correct |
1143 ms |
7184 KB |
Output is correct |
37 |
Correct |
1259 ms |
6608 KB |
Output is correct |
38 |
Correct |
1214 ms |
6648 KB |
Output is correct |
39 |
Correct |
442 ms |
7244 KB |
Output is correct |
40 |
Correct |
451 ms |
7004 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
40 ms |
4552 KB |
Output is correct |
3 |
Correct |
42 ms |
4572 KB |
Output is correct |
4 |
Correct |
41 ms |
4556 KB |
Output is correct |
5 |
Correct |
40 ms |
4496 KB |
Output is correct |
6 |
Correct |
28 ms |
4400 KB |
Output is correct |
7 |
Correct |
22 ms |
4556 KB |
Output is correct |
8 |
Correct |
34 ms |
4448 KB |
Output is correct |
9 |
Correct |
22 ms |
4540 KB |
Output is correct |
10 |
Correct |
31 ms |
4572 KB |
Output is correct |
11 |
Correct |
27 ms |
4560 KB |
Output is correct |
12 |
Correct |
25 ms |
4560 KB |
Output is correct |
13 |
Correct |
24 ms |
4540 KB |
Output is correct |
14 |
Correct |
33 ms |
4512 KB |
Output is correct |
15 |
Correct |
33 ms |
4496 KB |
Output is correct |
16 |
Correct |
0 ms |
216 KB |
Output is correct |
17 |
Correct |
1469 ms |
4856 KB |
Output is correct |
18 |
Correct |
522 ms |
4680 KB |
Output is correct |
19 |
Correct |
1385 ms |
5032 KB |
Output is correct |
20 |
Correct |
508 ms |
4888 KB |
Output is correct |
21 |
Correct |
1230 ms |
4772 KB |
Output is correct |
22 |
Correct |
526 ms |
4816 KB |
Output is correct |
23 |
Correct |
1410 ms |
4856 KB |
Output is correct |
24 |
Correct |
535 ms |
4692 KB |
Output is correct |
25 |
Correct |
1298 ms |
5032 KB |
Output is correct |
26 |
Correct |
251 ms |
4768 KB |
Output is correct |
27 |
Correct |
220 ms |
4624 KB |
Output is correct |
28 |
Correct |
436 ms |
5052 KB |
Output is correct |
29 |
Correct |
239 ms |
4700 KB |
Output is correct |
30 |
Correct |
229 ms |
4660 KB |
Output is correct |
31 |
Correct |
450 ms |
4740 KB |
Output is correct |
32 |
Correct |
488 ms |
4736 KB |
Output is correct |
33 |
Correct |
453 ms |
4752 KB |
Output is correct |
34 |
Correct |
474 ms |
4848 KB |
Output is correct |
35 |
Correct |
405 ms |
4984 KB |
Output is correct |
36 |
Correct |
482 ms |
4916 KB |
Output is correct |
37 |
Correct |
502 ms |
4828 KB |
Output is correct |
38 |
Correct |
446 ms |
4980 KB |
Output is correct |
39 |
Correct |
332 ms |
5000 KB |
Output is correct |
40 |
Correct |
322 ms |
5088 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
328 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 |
4 ms |
340 KB |
Output is correct |
6 |
Correct |
3 ms |
340 KB |
Output is correct |
7 |
Correct |
4 ms |
340 KB |
Output is correct |
8 |
Correct |
6 ms |
340 KB |
Output is correct |
9 |
Correct |
3 ms |
340 KB |
Output is correct |
10 |
Correct |
2 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
2 ms |
340 KB |
Output is correct |
13 |
Correct |
4 ms |
340 KB |
Output is correct |
14 |
Correct |
2 ms |
340 KB |
Output is correct |
15 |
Correct |
3 ms |
352 KB |
Output is correct |
16 |
Correct |
2 ms |
340 KB |
Output is correct |
17 |
Correct |
3 ms |
340 KB |
Output is correct |
18 |
Correct |
3 ms |
340 KB |
Output is correct |
19 |
Correct |
2 ms |
340 KB |
Output is correct |
20 |
Correct |
3 ms |
340 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
40 ms |
4552 KB |
Output is correct |
23 |
Correct |
42 ms |
4572 KB |
Output is correct |
24 |
Correct |
41 ms |
4556 KB |
Output is correct |
25 |
Correct |
40 ms |
4496 KB |
Output is correct |
26 |
Correct |
28 ms |
4400 KB |
Output is correct |
27 |
Correct |
22 ms |
4556 KB |
Output is correct |
28 |
Correct |
34 ms |
4448 KB |
Output is correct |
29 |
Correct |
22 ms |
4540 KB |
Output is correct |
30 |
Correct |
31 ms |
4572 KB |
Output is correct |
31 |
Correct |
27 ms |
4560 KB |
Output is correct |
32 |
Correct |
25 ms |
4560 KB |
Output is correct |
33 |
Correct |
24 ms |
4540 KB |
Output is correct |
34 |
Correct |
33 ms |
4512 KB |
Output is correct |
35 |
Correct |
33 ms |
4496 KB |
Output is correct |
36 |
Correct |
54 ms |
4656 KB |
Output is correct |
37 |
Correct |
54 ms |
4592 KB |
Output is correct |
38 |
Correct |
46 ms |
4660 KB |
Output is correct |
39 |
Correct |
56 ms |
4660 KB |
Output is correct |
40 |
Correct |
49 ms |
4572 KB |
Output is correct |
41 |
Correct |
30 ms |
4628 KB |
Output is correct |
42 |
Correct |
33 ms |
4592 KB |
Output is correct |
43 |
Correct |
37 ms |
4692 KB |
Output is correct |
44 |
Correct |
39 ms |
4568 KB |
Output is correct |
45 |
Correct |
45 ms |
4616 KB |
Output is correct |
46 |
Correct |
35 ms |
4648 KB |
Output is correct |
47 |
Correct |
30 ms |
4688 KB |
Output is correct |
48 |
Correct |
35 ms |
4688 KB |
Output is correct |
49 |
Correct |
37 ms |
4692 KB |
Output is correct |
50 |
Correct |
36 ms |
4620 KB |
Output is correct |
51 |
Correct |
39 ms |
4528 KB |
Output is correct |
52 |
Correct |
34 ms |
4644 KB |
Output is correct |
53 |
Correct |
1 ms |
212 KB |
Output is correct |
54 |
Correct |
931 ms |
5168 KB |
Output is correct |
55 |
Correct |
866 ms |
7148 KB |
Output is correct |
56 |
Correct |
933 ms |
6700 KB |
Output is correct |
57 |
Correct |
1429 ms |
6732 KB |
Output is correct |
58 |
Correct |
925 ms |
6620 KB |
Output is correct |
59 |
Correct |
857 ms |
7272 KB |
Output is correct |
60 |
Correct |
1022 ms |
6880 KB |
Output is correct |
61 |
Correct |
1393 ms |
6848 KB |
Output is correct |
62 |
Correct |
959 ms |
6724 KB |
Output is correct |
63 |
Correct |
1396 ms |
6664 KB |
Output is correct |
64 |
Correct |
259 ms |
7424 KB |
Output is correct |
65 |
Correct |
255 ms |
7432 KB |
Output is correct |
66 |
Correct |
257 ms |
7456 KB |
Output is correct |
67 |
Correct |
1761 ms |
6528 KB |
Output is correct |
68 |
Correct |
1841 ms |
6604 KB |
Output is correct |
69 |
Correct |
2039 ms |
6684 KB |
Output is correct |
70 |
Correct |
545 ms |
7116 KB |
Output is correct |
71 |
Correct |
2023 ms |
6660 KB |
Output is correct |
72 |
Correct |
1097 ms |
6824 KB |
Output is correct |
73 |
Correct |
1143 ms |
7184 KB |
Output is correct |
74 |
Correct |
1259 ms |
6608 KB |
Output is correct |
75 |
Correct |
1214 ms |
6648 KB |
Output is correct |
76 |
Correct |
442 ms |
7244 KB |
Output is correct |
77 |
Correct |
451 ms |
7004 KB |
Output is correct |
78 |
Correct |
0 ms |
216 KB |
Output is correct |
79 |
Correct |
1469 ms |
4856 KB |
Output is correct |
80 |
Correct |
522 ms |
4680 KB |
Output is correct |
81 |
Correct |
1385 ms |
5032 KB |
Output is correct |
82 |
Correct |
508 ms |
4888 KB |
Output is correct |
83 |
Correct |
1230 ms |
4772 KB |
Output is correct |
84 |
Correct |
526 ms |
4816 KB |
Output is correct |
85 |
Correct |
1410 ms |
4856 KB |
Output is correct |
86 |
Correct |
535 ms |
4692 KB |
Output is correct |
87 |
Correct |
1298 ms |
5032 KB |
Output is correct |
88 |
Correct |
251 ms |
4768 KB |
Output is correct |
89 |
Correct |
220 ms |
4624 KB |
Output is correct |
90 |
Correct |
436 ms |
5052 KB |
Output is correct |
91 |
Correct |
239 ms |
4700 KB |
Output is correct |
92 |
Correct |
229 ms |
4660 KB |
Output is correct |
93 |
Correct |
450 ms |
4740 KB |
Output is correct |
94 |
Correct |
488 ms |
4736 KB |
Output is correct |
95 |
Correct |
453 ms |
4752 KB |
Output is correct |
96 |
Correct |
474 ms |
4848 KB |
Output is correct |
97 |
Correct |
405 ms |
4984 KB |
Output is correct |
98 |
Correct |
482 ms |
4916 KB |
Output is correct |
99 |
Correct |
502 ms |
4828 KB |
Output is correct |
100 |
Correct |
446 ms |
4980 KB |
Output is correct |
101 |
Correct |
332 ms |
5000 KB |
Output is correct |
102 |
Correct |
322 ms |
5088 KB |
Output is correct |
103 |
Correct |
1902 ms |
6216 KB |
Output is correct |
104 |
Correct |
559 ms |
6848 KB |
Output is correct |
105 |
Correct |
1164 ms |
6636 KB |
Output is correct |
106 |
Correct |
925 ms |
6756 KB |
Output is correct |
107 |
Correct |
1313 ms |
6092 KB |
Output is correct |
108 |
Correct |
513 ms |
6956 KB |
Output is correct |
109 |
Correct |
1151 ms |
6632 KB |
Output is correct |
110 |
Correct |
766 ms |
6956 KB |
Output is correct |
111 |
Correct |
1171 ms |
7048 KB |
Output is correct |
112 |
Correct |
920 ms |
6860 KB |
Output is correct |
113 |
Correct |
237 ms |
7324 KB |
Output is correct |
114 |
Correct |
253 ms |
7464 KB |
Output is correct |
115 |
Correct |
485 ms |
6732 KB |
Output is correct |
116 |
Correct |
637 ms |
6736 KB |
Output is correct |
117 |
Correct |
259 ms |
7432 KB |
Output is correct |
118 |
Correct |
862 ms |
6836 KB |
Output is correct |
119 |
Correct |
230 ms |
7328 KB |
Output is correct |
120 |
Correct |
514 ms |
6608 KB |
Output is correct |
121 |
Correct |
672 ms |
6756 KB |
Output is correct |
122 |
Correct |
520 ms |
6688 KB |
Output is correct |
123 |
Correct |
661 ms |
6368 KB |
Output is correct |
124 |
Correct |
925 ms |
6720 KB |
Output is correct |
125 |
Correct |
1033 ms |
6604 KB |
Output is correct |
126 |
Correct |
1082 ms |
6776 KB |
Output is correct |
127 |
Correct |
582 ms |
6380 KB |
Output is correct |
128 |
Correct |
825 ms |
6696 KB |
Output is correct |
129 |
Correct |
372 ms |
7092 KB |
Output is correct |
130 |
Correct |
416 ms |
7080 KB |
Output is correct |