#include <bits/stdc++.h>
using namespace std;
long long N, o[100000], fw[100001], pA[400000], mC[400000];
pair<long long, long long> mA[400000];
vector<pair<long long, long long> > vA[400000];
stack<long long> s;
long long qf(long long i) {long long t = 0; while (i) t += fw[i], i -= i & -i; return t;}
void uf(long long i, long long v) {while (i < 100001) fw[i] += v, i += i & -i;}
long long qpl(long long i, long long p, long long v, long long l, long long h) {
//printf("QPL %lld [%lld] | %lld %lld | %lld %lld\n", i, pA[i], p, v, l, h);
if (l > p || pA[i] < v) return -1;
if (l >= h) return l;
long long c = qpl(i * 2 + 1, p, v, (l + h) / 2 + 1, h);
if (c > -1) return c;
return qpl(i * 2, p, v, l, (l + h) / 2);
}
long long qpr(long long i, long long p, long long v, long long l, long long h) {
//printf("QPR %lld [%lld] | %lld %lld | %lld %lld\n", i, pA[i], p, v, l, h);
if (h < p || pA[i] < v) return -1;
if (l >= h) return l;
long long c = qpr(i * 2, p, v, l, (l + h) / 2);
if (c > -1) return c;
return qpr(i * 2 + 1, p, v, (l + h) / 2 + 1, h);
}
void up(long long i, long long p, long long v, long long l, long long h) {
if (p < l || h < p) return;
if (p <= l && h <= p) {pA[i] = v; return;}
up(i * 2, p, v, l, (l + h) / 2);
up(i * 2 + 1, p, v, (l + h) / 2 + 1, h);
pA[i] = max(pA[i * 2], pA[i * 2 + 1]);
}
void inm(long long i, long long l, long long h) {
mA[i] = make_pair(0, h - l + 1);
if (l >= h) return;
inm(i * 2, l, (l + h) / 2);
inm(i * 2 + 1, (l + h) / 2 + 1, h);
}
pair<long long, long long> qm(long long i, long long a, long long b, long long l, long long h) {
if (b < l || h < a) return make_pair(LLONG_MAX, 0);
if (a <= l && h <= b) return mA[i];
if (mC[i]) {mA[i * 2].first += mC[i]; mC[i * 2] += mC[i]; mA[i * 2 + 1].first += mC[i]; mC[i * 2 + 1] += mC[i]; mC[i] = 0;}
pair<long long, long long> pa = qm(i * 2, a, b, l, (l + h) / 2), pb = qm(i * 2 + 1, a, b, (l + h) / 2 + 1, h);
if (pa > pb) swap(pa, pb);
if (pa.first == pb.first) pa.second += pb.second;
return pa;
}
void um(long long i, long long a, long long b, long long v, long long l, long long h) {
//printf("UM %lld | %lld %lld (%lld) | %lld %lld <- [%lld %lld]\n", i, a, b, v, l, h, mA[i].first, mA[i].second);
if (b < l || h < a) return;
if (a <= l && h <= b) {mA[i].first += v; mC[i] += v; return;}
if (mC[i]) {mA[i * 2].first += mC[i]; mC[i * 2] += mC[i]; mA[i * 2 + 1].first += mC[i]; mC[i * 2 + 1] += mC[i]; mC[i] = 0;}
um(i * 2, a, b, v, l, (l + h) / 2);
um(i * 2 + 1, a, b, v, (l + h) / 2 + 1, h);
mA[i] = min(mA[i * 2], mA[i * 2 + 1]);
if (mA[i * 2].first == mA[i * 2 + 1].first) mA[i].second = mA[i * 2].second + mA[i * 2 + 1].second;
//printf("UM %lld | %lld %lld (%lld) | %lld %lld -> [%lld %lld]\n", i, a, b, v, l, h, mA[i].first, mA[i].second);
}
void qv(long long i, long long p, long long l, long long h) {
if (p < l || h < p) return;
//printf("- QV %lld | %lld | %lld %lld - %lld\n", i, p, l, h, (l + h) / 2);
for (long long j = 0; j < vA[i].size(); ++j) if (vA[i][j].first <= p && p <= vA[i][j].second && min(o[vA[i][j].first], o[vA[i][j].second]) <= qf(vA[i][j].second) - qf(vA[i][j].first + 1)) {
um(1, vA[i][j].first + 1, vA[i][j].second - 1, -1, 0, N - 1);
swap(vA[i][j], vA[i].back());
vA[i].pop_back();
--j;
}
qv(i * 2, p, l, (l + h) / 2 - 1);
qv(i * 2 + 1, p, (l + h) / 2 + 1, h);
}
void uv(long long i, long long a, long long b, long long l, long long h) {
if (a + 1 == b) return;
//printf("- UV %lld | %lld %lld | %lld %lld - %lld\n", i, a, b, l, h, (l + h) / 2);
if (b < l || h < a) return;
if (a <= (l + h) / 2 && (l + h) / 2 <= b) {
for (long long j = 0; j < vA[i].size(); ++j) if (a == vA[i][j].first && b == vA[i][j].second) return;
um(1, a + 1, b - 1, 1, 0, N - 1);
vA[i].emplace_back(a, b);
return;
}
uv(i * 2, a, b, l, (l + h) / 2 - 1);
uv(i * 2 + 1, a, b, (l + h) / 2 + 1, h);
}
int main() {
//freopen("in.txt", "r", stdin);
long long Q, t, a, b, l, h, i, j;
scanf("%lld", &N);
inm(1, 0, N - 1);
for (i = 0; i < N; ++i) scanf("%lld", &o[i]), uf(i + 1, o[i]), up(1, i, o[i], 0, N - 1);
for (i = 0; i < N; ++i) {
while (!s.empty() && o[s.top()] <= o[i]) {if (o[s.top()] > qf(i) - qf(s.top() + 1)) uv(1, s.top(), i, 0, N - 1); s.pop();}
if (!s.empty() && o[i] > qf(i) - qf(s.top() + 1)) uv(1, s.top(), i, 0, N - 1);
s.push(i);
}
//printf("\nQ\n\n");
//for (j = 0; j < N; ++j) printf("%lld%c", qm(1, j, j, 0, N - 1).first, j < N - 1 ? ' ' : '\n');
scanf("%lld", &Q);
for (i = 0; i < Q; ++i) {
scanf("%lld %lld %lld", &t, &a, &b);
--a;
if (t == 1) {
uf(a + 1, b - o[a]);
up(1, a, b, 0, N - 1);
if (o[a] < b) {
o[a] = b;
qv(1, a, 0, N - 1);
for (l = a - 1; l > -1; l = qpl(1, l - 1, qf(a) - qf(l) + 1, 0, N - 1)) {
if (min(o[l], o[a]) > qf(a) - qf(l + 1)) uv(1, l, a, 0, N - 1);
if (o[l] >= o[a]) break;
}
for (h = a + 1; h > -1; h = qpr(1, h + 1, qf(h + 1) - qf(a + 1) + 1, 0, N - 1)) {
if (min(o[a], o[h]) > qf(h) - qf(a + 1)) uv(1, a, h, 0, N - 1);
if (o[a] <= o[h]) break;
}
} else {
o[a] = b;
qv(1, a, 0, N - 1);
l = qpl(1, a - 1, o[a] + 1, 0, N - 1);
h = qpr(1, a + 1, o[a] + 1, 0, N - 1);
while (l > -1 && h > -1) {
if (min(o[l], o[h]) > qf(h) - qf(l + 1)) uv(1, l, h, 0, N - 1);
if (o[l] < o[h]) l = qpl(1, l - 1, qf(h) - qf(l) + 1, 0, N - 1);
else h = qpr(1, h + 1, qf(h + 1) - qf(l + 1) + 1, 0, N - 1);
}
}
} else {
--b;
l = a;
h = b;
for (j = a; j > -1 && j <= b; j = qpr(1, j + 1, qf(j + 1) - qf(a) + 1, 0, N - 1)) if (o[j] > qf(j) - qf(a)) l = j;
for (j = b; j >= a; j = qpl(1, j - 1, qf(b + 1) - qf(j) + 1, 0, N - 1)) if (o[j] > qf(b + 1) - qf(j + 1)) h = j;
//for (j = 0; j < N; ++j) printf("%lld%c", qm(1, j, j, 0, N - 1).first, j < N - 1 ? ' ' : '\n');
printf("%lld\n", qm(1, l, h, 0, N - 1).second);
}
}
return 0;
}
Compilation message
fish2.cpp: In function 'void qv(long long int, long long int, long long int, long long int)':
fish2.cpp:70:29: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
70 | for (long long j = 0; j < vA[i].size(); ++j) if (vA[i][j].first <= p && p <= vA[i][j].second && min(o[vA[i][j].first], o[vA[i][j].second]) <= qf(vA[i][j].second) - qf(vA[i][j].first + 1)) {
| ~~^~~~~~~~~~~~~~
fish2.cpp: In function 'void uv(long long int, long long int, long long int, long long int, long long int)':
fish2.cpp:85:33: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
85 | for (long long j = 0; j < vA[i].size(); ++j) if (a == vA[i][j].first && b == vA[i][j].second) return;
| ~~^~~~~~~~~~~~~~
fish2.cpp: In function 'int main()':
fish2.cpp:97:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
97 | scanf("%lld", &N);
| ~~~~~^~~~~~~~~~~~
fish2.cpp:99:34: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
99 | for (i = 0; i < N; ++i) scanf("%lld", &o[i]), uf(i + 1, o[i]), up(1, i, o[i], 0, N - 1);
| ~~~~~^~~~~~~~~~~~~~~
fish2.cpp:107:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
107 | scanf("%lld", &Q);
| ~~~~~^~~~~~~~~~~~
fish2.cpp:109:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
109 | scanf("%lld %lld %lld", &t, &a, &b);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
9684 KB |
Output is correct |
2 |
Correct |
8 ms |
9684 KB |
Output is correct |
3 |
Correct |
7 ms |
9684 KB |
Output is correct |
4 |
Correct |
5 ms |
9684 KB |
Output is correct |
5 |
Correct |
7 ms |
9812 KB |
Output is correct |
6 |
Correct |
8 ms |
9812 KB |
Output is correct |
7 |
Correct |
7 ms |
9712 KB |
Output is correct |
8 |
Correct |
6 ms |
9812 KB |
Output is correct |
9 |
Correct |
7 ms |
9812 KB |
Output is correct |
10 |
Correct |
6 ms |
9716 KB |
Output is correct |
11 |
Correct |
6 ms |
9720 KB |
Output is correct |
12 |
Correct |
7 ms |
9812 KB |
Output is correct |
13 |
Correct |
8 ms |
9780 KB |
Output is correct |
14 |
Correct |
7 ms |
9812 KB |
Output is correct |
15 |
Correct |
8 ms |
9736 KB |
Output is correct |
16 |
Correct |
7 ms |
9812 KB |
Output is correct |
17 |
Correct |
7 ms |
9812 KB |
Output is correct |
18 |
Correct |
7 ms |
9708 KB |
Output is correct |
19 |
Correct |
8 ms |
9812 KB |
Output is correct |
20 |
Correct |
6 ms |
9756 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
9684 KB |
Output is correct |
2 |
Correct |
68 ms |
21324 KB |
Output is correct |
3 |
Correct |
78 ms |
21292 KB |
Output is correct |
4 |
Correct |
73 ms |
21432 KB |
Output is correct |
5 |
Correct |
68 ms |
21256 KB |
Output is correct |
6 |
Correct |
67 ms |
20312 KB |
Output is correct |
7 |
Correct |
48 ms |
20184 KB |
Output is correct |
8 |
Correct |
61 ms |
20364 KB |
Output is correct |
9 |
Correct |
54 ms |
20184 KB |
Output is correct |
10 |
Correct |
61 ms |
20280 KB |
Output is correct |
11 |
Correct |
60 ms |
20384 KB |
Output is correct |
12 |
Correct |
57 ms |
20364 KB |
Output is correct |
13 |
Correct |
54 ms |
20332 KB |
Output is correct |
14 |
Correct |
65 ms |
21036 KB |
Output is correct |
15 |
Correct |
75 ms |
20940 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
9684 KB |
Output is correct |
2 |
Correct |
8 ms |
9684 KB |
Output is correct |
3 |
Correct |
7 ms |
9684 KB |
Output is correct |
4 |
Correct |
5 ms |
9684 KB |
Output is correct |
5 |
Correct |
7 ms |
9812 KB |
Output is correct |
6 |
Correct |
8 ms |
9812 KB |
Output is correct |
7 |
Correct |
7 ms |
9712 KB |
Output is correct |
8 |
Correct |
6 ms |
9812 KB |
Output is correct |
9 |
Correct |
7 ms |
9812 KB |
Output is correct |
10 |
Correct |
6 ms |
9716 KB |
Output is correct |
11 |
Correct |
6 ms |
9720 KB |
Output is correct |
12 |
Correct |
7 ms |
9812 KB |
Output is correct |
13 |
Correct |
8 ms |
9780 KB |
Output is correct |
14 |
Correct |
7 ms |
9812 KB |
Output is correct |
15 |
Correct |
8 ms |
9736 KB |
Output is correct |
16 |
Correct |
7 ms |
9812 KB |
Output is correct |
17 |
Correct |
7 ms |
9812 KB |
Output is correct |
18 |
Correct |
7 ms |
9708 KB |
Output is correct |
19 |
Correct |
8 ms |
9812 KB |
Output is correct |
20 |
Correct |
6 ms |
9756 KB |
Output is correct |
21 |
Correct |
5 ms |
9684 KB |
Output is correct |
22 |
Correct |
68 ms |
21324 KB |
Output is correct |
23 |
Correct |
78 ms |
21292 KB |
Output is correct |
24 |
Correct |
73 ms |
21432 KB |
Output is correct |
25 |
Correct |
68 ms |
21256 KB |
Output is correct |
26 |
Correct |
67 ms |
20312 KB |
Output is correct |
27 |
Correct |
48 ms |
20184 KB |
Output is correct |
28 |
Correct |
61 ms |
20364 KB |
Output is correct |
29 |
Correct |
54 ms |
20184 KB |
Output is correct |
30 |
Correct |
61 ms |
20280 KB |
Output is correct |
31 |
Correct |
60 ms |
20384 KB |
Output is correct |
32 |
Correct |
57 ms |
20364 KB |
Output is correct |
33 |
Correct |
54 ms |
20332 KB |
Output is correct |
34 |
Correct |
65 ms |
21036 KB |
Output is correct |
35 |
Correct |
75 ms |
20940 KB |
Output is correct |
36 |
Correct |
97 ms |
22352 KB |
Output is correct |
37 |
Correct |
74 ms |
21588 KB |
Output is correct |
38 |
Correct |
69 ms |
21448 KB |
Output is correct |
39 |
Correct |
81 ms |
22208 KB |
Output is correct |
40 |
Correct |
71 ms |
21516 KB |
Output is correct |
41 |
Correct |
71 ms |
21280 KB |
Output is correct |
42 |
Correct |
69 ms |
21316 KB |
Output is correct |
43 |
Correct |
56 ms |
20328 KB |
Output is correct |
44 |
Correct |
52 ms |
20320 KB |
Output is correct |
45 |
Correct |
70 ms |
21068 KB |
Output is correct |
46 |
Correct |
62 ms |
20892 KB |
Output is correct |
47 |
Correct |
56 ms |
20220 KB |
Output is correct |
48 |
Correct |
64 ms |
20720 KB |
Output is correct |
49 |
Correct |
59 ms |
20872 KB |
Output is correct |
50 |
Correct |
67 ms |
21688 KB |
Output is correct |
51 |
Correct |
69 ms |
21548 KB |
Output is correct |
52 |
Correct |
73 ms |
21648 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
9684 KB |
Output is correct |
2 |
Correct |
68 ms |
21324 KB |
Output is correct |
3 |
Correct |
78 ms |
21292 KB |
Output is correct |
4 |
Correct |
73 ms |
21432 KB |
Output is correct |
5 |
Correct |
68 ms |
21256 KB |
Output is correct |
6 |
Correct |
67 ms |
20312 KB |
Output is correct |
7 |
Correct |
48 ms |
20184 KB |
Output is correct |
8 |
Correct |
61 ms |
20364 KB |
Output is correct |
9 |
Correct |
54 ms |
20184 KB |
Output is correct |
10 |
Correct |
61 ms |
20280 KB |
Output is correct |
11 |
Correct |
60 ms |
20384 KB |
Output is correct |
12 |
Correct |
57 ms |
20364 KB |
Output is correct |
13 |
Correct |
54 ms |
20332 KB |
Output is correct |
14 |
Correct |
65 ms |
21036 KB |
Output is correct |
15 |
Correct |
75 ms |
20940 KB |
Output is correct |
16 |
Correct |
6 ms |
9684 KB |
Output is correct |
17 |
Correct |
456 ms |
21632 KB |
Output is correct |
18 |
Correct |
454 ms |
21916 KB |
Output is correct |
19 |
Correct |
445 ms |
21632 KB |
Output is correct |
20 |
Correct |
440 ms |
21608 KB |
Output is correct |
21 |
Correct |
432 ms |
21600 KB |
Output is correct |
22 |
Correct |
429 ms |
21972 KB |
Output is correct |
23 |
Correct |
400 ms |
21596 KB |
Output is correct |
24 |
Correct |
547 ms |
21704 KB |
Output is correct |
25 |
Correct |
429 ms |
21668 KB |
Output is correct |
26 |
Correct |
488 ms |
21808 KB |
Output is correct |
27 |
Correct |
261 ms |
20924 KB |
Output is correct |
28 |
Correct |
224 ms |
20940 KB |
Output is correct |
29 |
Correct |
254 ms |
20956 KB |
Output is correct |
30 |
Correct |
367 ms |
20380 KB |
Output is correct |
31 |
Correct |
396 ms |
20380 KB |
Output is correct |
32 |
Correct |
586 ms |
20864 KB |
Output is correct |
33 |
Correct |
321 ms |
20888 KB |
Output is correct |
34 |
Correct |
560 ms |
20712 KB |
Output is correct |
35 |
Correct |
379 ms |
20344 KB |
Output is correct |
36 |
Correct |
507 ms |
21004 KB |
Output is correct |
37 |
Correct |
251 ms |
20776 KB |
Output is correct |
38 |
Correct |
215 ms |
20724 KB |
Output is correct |
39 |
Correct |
344 ms |
21584 KB |
Output is correct |
40 |
Correct |
229 ms |
21544 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
9684 KB |
Output is correct |
2 |
Correct |
68 ms |
21324 KB |
Output is correct |
3 |
Correct |
78 ms |
21292 KB |
Output is correct |
4 |
Correct |
73 ms |
21432 KB |
Output is correct |
5 |
Correct |
68 ms |
21256 KB |
Output is correct |
6 |
Correct |
67 ms |
20312 KB |
Output is correct |
7 |
Correct |
48 ms |
20184 KB |
Output is correct |
8 |
Correct |
61 ms |
20364 KB |
Output is correct |
9 |
Correct |
54 ms |
20184 KB |
Output is correct |
10 |
Correct |
61 ms |
20280 KB |
Output is correct |
11 |
Correct |
60 ms |
20384 KB |
Output is correct |
12 |
Correct |
57 ms |
20364 KB |
Output is correct |
13 |
Correct |
54 ms |
20332 KB |
Output is correct |
14 |
Correct |
65 ms |
21036 KB |
Output is correct |
15 |
Correct |
75 ms |
20940 KB |
Output is correct |
16 |
Correct |
5 ms |
9684 KB |
Output is correct |
17 |
Correct |
495 ms |
21684 KB |
Output is correct |
18 |
Correct |
599 ms |
25116 KB |
Output is correct |
19 |
Correct |
485 ms |
22804 KB |
Output is correct |
20 |
Correct |
491 ms |
25136 KB |
Output is correct |
21 |
Correct |
573 ms |
23248 KB |
Output is correct |
22 |
Correct |
533 ms |
25084 KB |
Output is correct |
23 |
Correct |
501 ms |
22828 KB |
Output is correct |
24 |
Correct |
590 ms |
25048 KB |
Output is correct |
25 |
Correct |
508 ms |
22776 KB |
Output is correct |
26 |
Correct |
254 ms |
23372 KB |
Output is correct |
27 |
Correct |
338 ms |
23628 KB |
Output is correct |
28 |
Correct |
401 ms |
23448 KB |
Output is correct |
29 |
Correct |
248 ms |
23500 KB |
Output is correct |
30 |
Correct |
315 ms |
23500 KB |
Output is correct |
31 |
Correct |
415 ms |
23632 KB |
Output is correct |
32 |
Correct |
501 ms |
24312 KB |
Output is correct |
33 |
Correct |
192 ms |
21964 KB |
Output is correct |
34 |
Correct |
504 ms |
25068 KB |
Output is correct |
35 |
Correct |
206 ms |
22216 KB |
Output is correct |
36 |
Correct |
459 ms |
23944 KB |
Output is correct |
37 |
Correct |
386 ms |
23216 KB |
Output is correct |
38 |
Correct |
301 ms |
22932 KB |
Output is correct |
39 |
Correct |
286 ms |
23784 KB |
Output is correct |
40 |
Correct |
295 ms |
23600 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
9684 KB |
Output is correct |
2 |
Correct |
8 ms |
9684 KB |
Output is correct |
3 |
Correct |
7 ms |
9684 KB |
Output is correct |
4 |
Correct |
5 ms |
9684 KB |
Output is correct |
5 |
Correct |
7 ms |
9812 KB |
Output is correct |
6 |
Correct |
8 ms |
9812 KB |
Output is correct |
7 |
Correct |
7 ms |
9712 KB |
Output is correct |
8 |
Correct |
6 ms |
9812 KB |
Output is correct |
9 |
Correct |
7 ms |
9812 KB |
Output is correct |
10 |
Correct |
6 ms |
9716 KB |
Output is correct |
11 |
Correct |
6 ms |
9720 KB |
Output is correct |
12 |
Correct |
7 ms |
9812 KB |
Output is correct |
13 |
Correct |
8 ms |
9780 KB |
Output is correct |
14 |
Correct |
7 ms |
9812 KB |
Output is correct |
15 |
Correct |
8 ms |
9736 KB |
Output is correct |
16 |
Correct |
7 ms |
9812 KB |
Output is correct |
17 |
Correct |
7 ms |
9812 KB |
Output is correct |
18 |
Correct |
7 ms |
9708 KB |
Output is correct |
19 |
Correct |
8 ms |
9812 KB |
Output is correct |
20 |
Correct |
6 ms |
9756 KB |
Output is correct |
21 |
Correct |
5 ms |
9684 KB |
Output is correct |
22 |
Correct |
68 ms |
21324 KB |
Output is correct |
23 |
Correct |
78 ms |
21292 KB |
Output is correct |
24 |
Correct |
73 ms |
21432 KB |
Output is correct |
25 |
Correct |
68 ms |
21256 KB |
Output is correct |
26 |
Correct |
67 ms |
20312 KB |
Output is correct |
27 |
Correct |
48 ms |
20184 KB |
Output is correct |
28 |
Correct |
61 ms |
20364 KB |
Output is correct |
29 |
Correct |
54 ms |
20184 KB |
Output is correct |
30 |
Correct |
61 ms |
20280 KB |
Output is correct |
31 |
Correct |
60 ms |
20384 KB |
Output is correct |
32 |
Correct |
57 ms |
20364 KB |
Output is correct |
33 |
Correct |
54 ms |
20332 KB |
Output is correct |
34 |
Correct |
65 ms |
21036 KB |
Output is correct |
35 |
Correct |
75 ms |
20940 KB |
Output is correct |
36 |
Correct |
97 ms |
22352 KB |
Output is correct |
37 |
Correct |
74 ms |
21588 KB |
Output is correct |
38 |
Correct |
69 ms |
21448 KB |
Output is correct |
39 |
Correct |
81 ms |
22208 KB |
Output is correct |
40 |
Correct |
71 ms |
21516 KB |
Output is correct |
41 |
Correct |
71 ms |
21280 KB |
Output is correct |
42 |
Correct |
69 ms |
21316 KB |
Output is correct |
43 |
Correct |
56 ms |
20328 KB |
Output is correct |
44 |
Correct |
52 ms |
20320 KB |
Output is correct |
45 |
Correct |
70 ms |
21068 KB |
Output is correct |
46 |
Correct |
62 ms |
20892 KB |
Output is correct |
47 |
Correct |
56 ms |
20220 KB |
Output is correct |
48 |
Correct |
64 ms |
20720 KB |
Output is correct |
49 |
Correct |
59 ms |
20872 KB |
Output is correct |
50 |
Correct |
67 ms |
21688 KB |
Output is correct |
51 |
Correct |
69 ms |
21548 KB |
Output is correct |
52 |
Correct |
73 ms |
21648 KB |
Output is correct |
53 |
Correct |
6 ms |
9684 KB |
Output is correct |
54 |
Correct |
456 ms |
21632 KB |
Output is correct |
55 |
Correct |
454 ms |
21916 KB |
Output is correct |
56 |
Correct |
445 ms |
21632 KB |
Output is correct |
57 |
Correct |
440 ms |
21608 KB |
Output is correct |
58 |
Correct |
432 ms |
21600 KB |
Output is correct |
59 |
Correct |
429 ms |
21972 KB |
Output is correct |
60 |
Correct |
400 ms |
21596 KB |
Output is correct |
61 |
Correct |
547 ms |
21704 KB |
Output is correct |
62 |
Correct |
429 ms |
21668 KB |
Output is correct |
63 |
Correct |
488 ms |
21808 KB |
Output is correct |
64 |
Correct |
261 ms |
20924 KB |
Output is correct |
65 |
Correct |
224 ms |
20940 KB |
Output is correct |
66 |
Correct |
254 ms |
20956 KB |
Output is correct |
67 |
Correct |
367 ms |
20380 KB |
Output is correct |
68 |
Correct |
396 ms |
20380 KB |
Output is correct |
69 |
Correct |
586 ms |
20864 KB |
Output is correct |
70 |
Correct |
321 ms |
20888 KB |
Output is correct |
71 |
Correct |
560 ms |
20712 KB |
Output is correct |
72 |
Correct |
379 ms |
20344 KB |
Output is correct |
73 |
Correct |
507 ms |
21004 KB |
Output is correct |
74 |
Correct |
251 ms |
20776 KB |
Output is correct |
75 |
Correct |
215 ms |
20724 KB |
Output is correct |
76 |
Correct |
344 ms |
21584 KB |
Output is correct |
77 |
Correct |
229 ms |
21544 KB |
Output is correct |
78 |
Correct |
5 ms |
9684 KB |
Output is correct |
79 |
Correct |
495 ms |
21684 KB |
Output is correct |
80 |
Correct |
599 ms |
25116 KB |
Output is correct |
81 |
Correct |
485 ms |
22804 KB |
Output is correct |
82 |
Correct |
491 ms |
25136 KB |
Output is correct |
83 |
Correct |
573 ms |
23248 KB |
Output is correct |
84 |
Correct |
533 ms |
25084 KB |
Output is correct |
85 |
Correct |
501 ms |
22828 KB |
Output is correct |
86 |
Correct |
590 ms |
25048 KB |
Output is correct |
87 |
Correct |
508 ms |
22776 KB |
Output is correct |
88 |
Correct |
254 ms |
23372 KB |
Output is correct |
89 |
Correct |
338 ms |
23628 KB |
Output is correct |
90 |
Correct |
401 ms |
23448 KB |
Output is correct |
91 |
Correct |
248 ms |
23500 KB |
Output is correct |
92 |
Correct |
315 ms |
23500 KB |
Output is correct |
93 |
Correct |
415 ms |
23632 KB |
Output is correct |
94 |
Correct |
501 ms |
24312 KB |
Output is correct |
95 |
Correct |
192 ms |
21964 KB |
Output is correct |
96 |
Correct |
504 ms |
25068 KB |
Output is correct |
97 |
Correct |
206 ms |
22216 KB |
Output is correct |
98 |
Correct |
459 ms |
23944 KB |
Output is correct |
99 |
Correct |
386 ms |
23216 KB |
Output is correct |
100 |
Correct |
301 ms |
22932 KB |
Output is correct |
101 |
Correct |
286 ms |
23784 KB |
Output is correct |
102 |
Correct |
295 ms |
23600 KB |
Output is correct |
103 |
Correct |
451 ms |
22500 KB |
Output is correct |
104 |
Correct |
561 ms |
25676 KB |
Output is correct |
105 |
Correct |
513 ms |
23456 KB |
Output is correct |
106 |
Correct |
486 ms |
24388 KB |
Output is correct |
107 |
Correct |
533 ms |
22736 KB |
Output is correct |
108 |
Correct |
513 ms |
25652 KB |
Output is correct |
109 |
Correct |
454 ms |
23244 KB |
Output is correct |
110 |
Correct |
519 ms |
24780 KB |
Output is correct |
111 |
Correct |
495 ms |
23424 KB |
Output is correct |
112 |
Correct |
437 ms |
24216 KB |
Output is correct |
113 |
Correct |
287 ms |
23496 KB |
Output is correct |
114 |
Correct |
234 ms |
23284 KB |
Output is correct |
115 |
Correct |
439 ms |
23640 KB |
Output is correct |
116 |
Correct |
405 ms |
23372 KB |
Output is correct |
117 |
Correct |
242 ms |
23384 KB |
Output is correct |
118 |
Correct |
397 ms |
22588 KB |
Output is correct |
119 |
Correct |
290 ms |
23632 KB |
Output is correct |
120 |
Correct |
461 ms |
23612 KB |
Output is correct |
121 |
Correct |
383 ms |
23240 KB |
Output is correct |
122 |
Correct |
545 ms |
24272 KB |
Output is correct |
123 |
Correct |
222 ms |
21804 KB |
Output is correct |
124 |
Correct |
435 ms |
23336 KB |
Output is correct |
125 |
Correct |
333 ms |
20308 KB |
Output is correct |
126 |
Correct |
455 ms |
21300 KB |
Output is correct |
127 |
Correct |
389 ms |
21684 KB |
Output is correct |
128 |
Correct |
310 ms |
22740 KB |
Output is correct |
129 |
Correct |
340 ms |
24100 KB |
Output is correct |
130 |
Correct |
272 ms |
23628 KB |
Output is correct |