#include<bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define endl "\n"
#define int long long
using namespace std;
const int N = 1e5 + 10;
int n;
long long bit[N], a[N];
struct IT1 {
int T[N << 2];
void up(int s, int l, int r, int pos, int val) {
if (l == r) {
T[s] = val;
return;
}
int mid = l + r >> 1;
if (pos <= mid) up(s << 1, l, mid, pos, val);
else up(s << 1 | 1, mid + 1, r, pos, val);
T[s] = max(T[s << 1], T[s << 1 | 1]);
}
int find_right(int s, int l, int r, int from, int to, int val) {
if (l > to || r < from) return 0;
if (from <= l && r <= to) {
if (T[s] <= val) return 0;
while (l != r) {
int mid = l + r >> 1;
if (T[s << 1] > val) {
s = s << 1;
r = mid;
}
else {
s = s << 1 | 1;
l = mid + 1;
}
}
return l;
}
int mid = l + r >> 1;
int ret = find_right(s << 1, l, mid, from, to, val);
if (ret) return ret;
return find_right(s << 1 | 1, mid + 1, r, from, to, val);
}
int find_left(int s, int l, int r, int from, int to, int val) {
if (l > to || r < from) return 0;
if (from <= l && r <= to) {
if (T[s] <= val) return 0;
while (l != r) {
int mid = l + r >> 1;
if (T[s << 1 | 1] > val) {
s = s << 1 | 1;
l = mid + 1;
}
else {
s = s << 1;
r = mid;
}
}
return l;
}
int mid = l + r >> 1;
int ret = find_left(s << 1 | 1, mid + 1, r, from, to, val);
if (ret) return ret;
return find_left(s << 1, l, mid, from, to, val);
}
} it1;
struct IT2 {
pair<int, int> T[N << 2];
int lazy[N << 2];
pair<int, int> gather(pair<int, int> x, pair<int, int> y) {
if (x.first == y.first) return make_pair(x.first, x.second + y.second);
return min(x, y);
}
void build(int s, int l, int r) {
T[s].second = r - l + 1;
if (l != r) {
int mid = l + r >> 1;
build(s << 1, l, mid);
build(s << 1 | 1, mid + 1, r);
}
}
void push(int s, int l, int r) {
if (!lazy[s]) return;
T[s].first += lazy[s];
if (l != r) {
lazy[s << 1] += lazy[s];
lazy[s << 1 | 1] += lazy[s];
}
lazy[s] = 0;
}
void up(int s, int l, int r, int from, int to, int val) {
push(s, l, r);
if (l > to || r < from) return;
if (from <= l && r <= to) {
lazy[s] = val;
push(s, l, r);
return;
}
int mid = l + r >> 1;
up(s << 1, l, mid, from, to, val);
up(s << 1 | 1, mid + 1, r, from, to, val);
T[s] = gather(T[s << 1], T[s << 1 | 1]);
}
pair<int, int> get(int s, int l, int r, int from, int to) {
push(s, l, r);
if (l > to || r < from) return make_pair(1e9, 0);
if (from <= l && r <= to) return T[s];
int mid = l + r >> 1;
return gather(get(s << 1, l, mid, from, to), get(s << 1 | 1, mid + 1, r, from, to));
}
} it2;
void up_bit(int pos, int val) {
while (pos <= n) {
bit[pos] += val;
pos += pos & -pos;
}
}
long long get_bit(int l, int r) {
long long ret = 0;
for(int pos = r; pos; pos -= pos & -pos) ret += bit[pos];
for(int pos = l - 1; pos; pos -= pos & -pos) ret -= bit[pos];
return ret;
}
vector<pair<int, int> > expand (int pos) {
vector<pair<int, int> > ret;
if (pos == 0 || pos == n + 1) return ret;
int l = pos, r = pos, sum = a[pos];
while (1) {
int _r = it1.find_right(1, 1, n, r + 1, n, sum);
if (_r == 0) _r = _r = n + 1;
int _l = it1.find_left(1, 1, n, 1, l - 1, sum);
if (_l == 0 && _r == n + 1) return ret;
sum = get_bit(_l + 1, _r - 1);
if (sum < a[_l] && sum < a[_r]) ret.emplace_back(_l + 1, _r - 1);
if (a[_l] <= a[_r]) l = _l;
else r = _r;
}
return ret;
}
vector<pair<int, int> > _expand (int pos) {
vector<pair<int, int> > ret = expand(pos);
vector<pair<int, int> > left = expand(pos - 1);
vector<pair<int, int> > right = expand(pos + 1);
for(auto &[l, r] : left) if (r == pos - 1) ret.emplace_back(l, r);
for(auto &[l, r] : right) if (l == pos + 1) ret.emplace_back(l, r);
return ret;
}
int32_t main() {
#define task ""
cin.tie(0) -> sync_with_stdio(0);
if (fopen("task.inp", "r")) {
freopen("task.inp", "r", stdin);
freopen("task.out", "w", stdout);
}
if (fopen(task".inp", "r")) {
freopen (task".inp", "r", stdin);
freopen (task".out", "w", stdout);
}
cin >> n;
a[0] = a[n + 1] = 1e18;
it2.build(1, 1, n);
auto add = [&] (int pos, int val) {
vector<pair<int, int> > old = _expand(pos);
for(auto &[l, r] : old) {
it2.up(1, 1, n, l, r, -1);
// cout << pos << " " << l << " " << r << "#\n";
}
up_bit(pos, val - a[pos]);
a[pos] = val;
it1.up(1, 1, n, pos, val);
vector<pair<int, int> > cur = _expand(pos);
for(auto &[l, r] : cur) {
it2.up(1, 1, n, l, r, 1);
// cout << pos << " " << l << " " << r << "@\n";
}
};
auto query = [&] (int l, int r) {
int j = r, last = r;
long long sum = a[r];
while (j > l) {
j = it1.find_left(1, 1, n, 1, j - 1, sum);
if (j < l) break;
sum = get_bit(j + 1, r);
if (sum < a[j]) last = j;
sum += a[j];
}
r = last;
j = l;
last = l;
sum = a[l];
while (j < r) {
j = it1.find_right(1, 1, n, j + 1, n, sum);
if (j == 0 || j > r) break;
sum = get_bit(l, j - 1);
if (sum < a[j]) last = j;
sum += a[j];
}
l = last;
pair<int, int> tmp = it2.get(1, 1, n, l, r);
return tmp.second;
};
for(int i = 1; i <= n; i++) {
int x; cin >> x;
add(i, x);
}
int q; cin >> q;
while (q--) {
int t, x, y; cin >> t >> x >> y;
if (t == 1) add(x, y);
else cout << query(x, y) << endl;
}
}
Compilation message
fish2.cpp: In member function 'void IT1::up(long long int, long long int, long long int, long long int, long long int)':
fish2.cpp:21:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
21 | int mid = l + r >> 1;
| ~~^~~
fish2.cpp: In member function 'long long int IT1::find_right(long long int, long long int, long long int, long long int, long long int, long long int)':
fish2.cpp:32:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
32 | int mid = l + r >> 1;
| ~~^~~
fish2.cpp:44:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
44 | int mid = l + r >> 1;
| ~~^~~
fish2.cpp: In member function 'long long int IT1::find_left(long long int, long long int, long long int, long long int, long long int, long long int)':
fish2.cpp:55:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
55 | int mid = l + r >> 1;
| ~~^~~
fish2.cpp:67:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
67 | int mid = l + r >> 1;
| ~~^~~
fish2.cpp: In member function 'void IT2::build(long long int, long long int, long long int)':
fish2.cpp:86:19: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
86 | int mid = l + r >> 1;
| ~~^~~
fish2.cpp: In member function 'void IT2::up(long long int, long long int, long long int, long long int, long long int, long long int)':
fish2.cpp:110:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
110 | int mid = l + r >> 1;
| ~~^~~
fish2.cpp: In member function 'std::pair<long long int, long long int> IT2::get(long long int, long long int, long long int, long long int, long long int)':
fish2.cpp:120:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
120 | int mid = l + r >> 1;
| ~~^~~
fish2.cpp: In function 'std::vector<std::pair<long long int, long long int> > expand(long long int)':
fish2.cpp:145:21: warning: operation on '_r' may be undefined [-Wsequence-point]
145 | if (_r == 0) _r = _r = n + 1;
| ~~~^~~~~~~~~~~~
fish2.cpp: In function 'int32_t main()':
fish2.cpp:172:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
172 | freopen("task.inp", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
fish2.cpp:173:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
173 | freopen("task.out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
fish2.cpp:177:13: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
177 | freopen (task".inp", "r", stdin);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
fish2.cpp:178:13: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
178 | freopen (task".out", "w", stdout);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
6744 KB |
Output is correct |
2 |
Correct |
1 ms |
6744 KB |
Output is correct |
3 |
Correct |
1 ms |
6748 KB |
Output is correct |
4 |
Correct |
2 ms |
6748 KB |
Output is correct |
5 |
Correct |
7 ms |
6748 KB |
Output is correct |
6 |
Correct |
4 ms |
6744 KB |
Output is correct |
7 |
Correct |
7 ms |
6748 KB |
Output is correct |
8 |
Correct |
6 ms |
6748 KB |
Output is correct |
9 |
Correct |
5 ms |
6816 KB |
Output is correct |
10 |
Correct |
4 ms |
6744 KB |
Output is correct |
11 |
Correct |
3 ms |
6748 KB |
Output is correct |
12 |
Correct |
6 ms |
6576 KB |
Output is correct |
13 |
Correct |
5 ms |
6748 KB |
Output is correct |
14 |
Correct |
6 ms |
6748 KB |
Output is correct |
15 |
Correct |
7 ms |
6748 KB |
Output is correct |
16 |
Correct |
7 ms |
6748 KB |
Output is correct |
17 |
Correct |
5 ms |
6748 KB |
Output is correct |
18 |
Correct |
4 ms |
6784 KB |
Output is correct |
19 |
Correct |
4 ms |
6744 KB |
Output is correct |
20 |
Correct |
3 ms |
6748 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
6748 KB |
Output is correct |
2 |
Correct |
456 ms |
13112 KB |
Output is correct |
3 |
Correct |
805 ms |
12712 KB |
Output is correct |
4 |
Correct |
435 ms |
12920 KB |
Output is correct |
5 |
Correct |
777 ms |
12672 KB |
Output is correct |
6 |
Correct |
340 ms |
13476 KB |
Output is correct |
7 |
Correct |
963 ms |
12680 KB |
Output is correct |
8 |
Correct |
357 ms |
13136 KB |
Output is correct |
9 |
Correct |
1036 ms |
12564 KB |
Output is correct |
10 |
Correct |
1086 ms |
13184 KB |
Output is correct |
11 |
Correct |
1508 ms |
12816 KB |
Output is correct |
12 |
Correct |
562 ms |
12548 KB |
Output is correct |
13 |
Correct |
532 ms |
12748 KB |
Output is correct |
14 |
Correct |
439 ms |
12816 KB |
Output is correct |
15 |
Correct |
452 ms |
12804 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
6744 KB |
Output is correct |
2 |
Correct |
1 ms |
6744 KB |
Output is correct |
3 |
Correct |
1 ms |
6748 KB |
Output is correct |
4 |
Correct |
2 ms |
6748 KB |
Output is correct |
5 |
Correct |
7 ms |
6748 KB |
Output is correct |
6 |
Correct |
4 ms |
6744 KB |
Output is correct |
7 |
Correct |
7 ms |
6748 KB |
Output is correct |
8 |
Correct |
6 ms |
6748 KB |
Output is correct |
9 |
Correct |
5 ms |
6816 KB |
Output is correct |
10 |
Correct |
4 ms |
6744 KB |
Output is correct |
11 |
Correct |
3 ms |
6748 KB |
Output is correct |
12 |
Correct |
6 ms |
6576 KB |
Output is correct |
13 |
Correct |
5 ms |
6748 KB |
Output is correct |
14 |
Correct |
6 ms |
6748 KB |
Output is correct |
15 |
Correct |
7 ms |
6748 KB |
Output is correct |
16 |
Correct |
7 ms |
6748 KB |
Output is correct |
17 |
Correct |
5 ms |
6748 KB |
Output is correct |
18 |
Correct |
4 ms |
6784 KB |
Output is correct |
19 |
Correct |
4 ms |
6744 KB |
Output is correct |
20 |
Correct |
3 ms |
6748 KB |
Output is correct |
21 |
Correct |
1 ms |
6748 KB |
Output is correct |
22 |
Correct |
456 ms |
13112 KB |
Output is correct |
23 |
Correct |
805 ms |
12712 KB |
Output is correct |
24 |
Correct |
435 ms |
12920 KB |
Output is correct |
25 |
Correct |
777 ms |
12672 KB |
Output is correct |
26 |
Correct |
340 ms |
13476 KB |
Output is correct |
27 |
Correct |
963 ms |
12680 KB |
Output is correct |
28 |
Correct |
357 ms |
13136 KB |
Output is correct |
29 |
Correct |
1036 ms |
12564 KB |
Output is correct |
30 |
Correct |
1086 ms |
13184 KB |
Output is correct |
31 |
Correct |
1508 ms |
12816 KB |
Output is correct |
32 |
Correct |
562 ms |
12548 KB |
Output is correct |
33 |
Correct |
532 ms |
12748 KB |
Output is correct |
34 |
Correct |
439 ms |
12816 KB |
Output is correct |
35 |
Correct |
452 ms |
12804 KB |
Output is correct |
36 |
Correct |
391 ms |
12880 KB |
Output is correct |
37 |
Correct |
800 ms |
12628 KB |
Output is correct |
38 |
Correct |
797 ms |
12628 KB |
Output is correct |
39 |
Correct |
405 ms |
12880 KB |
Output is correct |
40 |
Correct |
792 ms |
12816 KB |
Output is correct |
41 |
Correct |
346 ms |
13256 KB |
Output is correct |
42 |
Correct |
340 ms |
13140 KB |
Output is correct |
43 |
Correct |
963 ms |
12596 KB |
Output is correct |
44 |
Correct |
882 ms |
12488 KB |
Output is correct |
45 |
Correct |
1589 ms |
12836 KB |
Output is correct |
46 |
Correct |
1142 ms |
12980 KB |
Output is correct |
47 |
Correct |
1561 ms |
12704 KB |
Output is correct |
48 |
Correct |
553 ms |
12648 KB |
Output is correct |
49 |
Correct |
497 ms |
12452 KB |
Output is correct |
50 |
Correct |
491 ms |
13028 KB |
Output is correct |
51 |
Correct |
446 ms |
12860 KB |
Output is correct |
52 |
Correct |
445 ms |
12764 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
6748 KB |
Output is correct |
2 |
Correct |
456 ms |
13112 KB |
Output is correct |
3 |
Correct |
805 ms |
12712 KB |
Output is correct |
4 |
Correct |
435 ms |
12920 KB |
Output is correct |
5 |
Correct |
777 ms |
12672 KB |
Output is correct |
6 |
Correct |
340 ms |
13476 KB |
Output is correct |
7 |
Correct |
963 ms |
12680 KB |
Output is correct |
8 |
Correct |
357 ms |
13136 KB |
Output is correct |
9 |
Correct |
1036 ms |
12564 KB |
Output is correct |
10 |
Correct |
1086 ms |
13184 KB |
Output is correct |
11 |
Correct |
1508 ms |
12816 KB |
Output is correct |
12 |
Correct |
562 ms |
12548 KB |
Output is correct |
13 |
Correct |
532 ms |
12748 KB |
Output is correct |
14 |
Correct |
439 ms |
12816 KB |
Output is correct |
15 |
Correct |
452 ms |
12804 KB |
Output is correct |
16 |
Correct |
1 ms |
6744 KB |
Output is correct |
17 |
Correct |
1052 ms |
14552 KB |
Output is correct |
18 |
Correct |
589 ms |
14580 KB |
Output is correct |
19 |
Correct |
1025 ms |
14264 KB |
Output is correct |
20 |
Correct |
1179 ms |
14432 KB |
Output is correct |
21 |
Correct |
1108 ms |
14436 KB |
Output is correct |
22 |
Correct |
590 ms |
14676 KB |
Output is correct |
23 |
Correct |
1317 ms |
14412 KB |
Output is correct |
24 |
Correct |
1161 ms |
14316 KB |
Output is correct |
25 |
Correct |
1041 ms |
14400 KB |
Output is correct |
26 |
Correct |
1077 ms |
14316 KB |
Output is correct |
27 |
Correct |
519 ms |
15184 KB |
Output is correct |
28 |
Correct |
464 ms |
15184 KB |
Output is correct |
29 |
Correct |
467 ms |
15140 KB |
Output is correct |
30 |
Correct |
1253 ms |
14444 KB |
Output is correct |
31 |
Correct |
1270 ms |
14228 KB |
Output is correct |
32 |
Correct |
1855 ms |
14252 KB |
Output is correct |
33 |
Correct |
1286 ms |
14920 KB |
Output is correct |
34 |
Correct |
1848 ms |
14152 KB |
Output is correct |
35 |
Correct |
1852 ms |
14168 KB |
Output is correct |
36 |
Correct |
1425 ms |
14720 KB |
Output is correct |
37 |
Correct |
668 ms |
14320 KB |
Output is correct |
38 |
Correct |
685 ms |
14132 KB |
Output is correct |
39 |
Correct |
599 ms |
14768 KB |
Output is correct |
40 |
Correct |
584 ms |
14932 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
6748 KB |
Output is correct |
2 |
Correct |
456 ms |
13112 KB |
Output is correct |
3 |
Correct |
805 ms |
12712 KB |
Output is correct |
4 |
Correct |
435 ms |
12920 KB |
Output is correct |
5 |
Correct |
777 ms |
12672 KB |
Output is correct |
6 |
Correct |
340 ms |
13476 KB |
Output is correct |
7 |
Correct |
963 ms |
12680 KB |
Output is correct |
8 |
Correct |
357 ms |
13136 KB |
Output is correct |
9 |
Correct |
1036 ms |
12564 KB |
Output is correct |
10 |
Correct |
1086 ms |
13184 KB |
Output is correct |
11 |
Correct |
1508 ms |
12816 KB |
Output is correct |
12 |
Correct |
562 ms |
12548 KB |
Output is correct |
13 |
Correct |
532 ms |
12748 KB |
Output is correct |
14 |
Correct |
439 ms |
12816 KB |
Output is correct |
15 |
Correct |
452 ms |
12804 KB |
Output is correct |
16 |
Correct |
1 ms |
6748 KB |
Output is correct |
17 |
Correct |
2202 ms |
13816 KB |
Output is correct |
18 |
Correct |
1630 ms |
14432 KB |
Output is correct |
19 |
Correct |
2086 ms |
13788 KB |
Output is correct |
20 |
Correct |
1486 ms |
14244 KB |
Output is correct |
21 |
Correct |
2137 ms |
13952 KB |
Output is correct |
22 |
Correct |
1529 ms |
14548 KB |
Output is correct |
23 |
Correct |
2191 ms |
13884 KB |
Output is correct |
24 |
Correct |
1484 ms |
14596 KB |
Output is correct |
25 |
Correct |
2085 ms |
13876 KB |
Output is correct |
26 |
Correct |
642 ms |
14928 KB |
Output is correct |
27 |
Correct |
724 ms |
15072 KB |
Output is correct |
28 |
Correct |
1463 ms |
14284 KB |
Output is correct |
29 |
Correct |
655 ms |
15204 KB |
Output is correct |
30 |
Correct |
738 ms |
14928 KB |
Output is correct |
31 |
Correct |
1760 ms |
14200 KB |
Output is correct |
32 |
Correct |
2218 ms |
14360 KB |
Output is correct |
33 |
Correct |
1977 ms |
13980 KB |
Output is correct |
34 |
Correct |
1747 ms |
14768 KB |
Output is correct |
35 |
Correct |
1510 ms |
14312 KB |
Output is correct |
36 |
Correct |
2124 ms |
14404 KB |
Output is correct |
37 |
Correct |
1148 ms |
13904 KB |
Output is correct |
38 |
Correct |
952 ms |
14160 KB |
Output is correct |
39 |
Correct |
793 ms |
14672 KB |
Output is correct |
40 |
Correct |
605 ms |
14676 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
6744 KB |
Output is correct |
2 |
Correct |
1 ms |
6744 KB |
Output is correct |
3 |
Correct |
1 ms |
6748 KB |
Output is correct |
4 |
Correct |
2 ms |
6748 KB |
Output is correct |
5 |
Correct |
7 ms |
6748 KB |
Output is correct |
6 |
Correct |
4 ms |
6744 KB |
Output is correct |
7 |
Correct |
7 ms |
6748 KB |
Output is correct |
8 |
Correct |
6 ms |
6748 KB |
Output is correct |
9 |
Correct |
5 ms |
6816 KB |
Output is correct |
10 |
Correct |
4 ms |
6744 KB |
Output is correct |
11 |
Correct |
3 ms |
6748 KB |
Output is correct |
12 |
Correct |
6 ms |
6576 KB |
Output is correct |
13 |
Correct |
5 ms |
6748 KB |
Output is correct |
14 |
Correct |
6 ms |
6748 KB |
Output is correct |
15 |
Correct |
7 ms |
6748 KB |
Output is correct |
16 |
Correct |
7 ms |
6748 KB |
Output is correct |
17 |
Correct |
5 ms |
6748 KB |
Output is correct |
18 |
Correct |
4 ms |
6784 KB |
Output is correct |
19 |
Correct |
4 ms |
6744 KB |
Output is correct |
20 |
Correct |
3 ms |
6748 KB |
Output is correct |
21 |
Correct |
1 ms |
6748 KB |
Output is correct |
22 |
Correct |
456 ms |
13112 KB |
Output is correct |
23 |
Correct |
805 ms |
12712 KB |
Output is correct |
24 |
Correct |
435 ms |
12920 KB |
Output is correct |
25 |
Correct |
777 ms |
12672 KB |
Output is correct |
26 |
Correct |
340 ms |
13476 KB |
Output is correct |
27 |
Correct |
963 ms |
12680 KB |
Output is correct |
28 |
Correct |
357 ms |
13136 KB |
Output is correct |
29 |
Correct |
1036 ms |
12564 KB |
Output is correct |
30 |
Correct |
1086 ms |
13184 KB |
Output is correct |
31 |
Correct |
1508 ms |
12816 KB |
Output is correct |
32 |
Correct |
562 ms |
12548 KB |
Output is correct |
33 |
Correct |
532 ms |
12748 KB |
Output is correct |
34 |
Correct |
439 ms |
12816 KB |
Output is correct |
35 |
Correct |
452 ms |
12804 KB |
Output is correct |
36 |
Correct |
391 ms |
12880 KB |
Output is correct |
37 |
Correct |
800 ms |
12628 KB |
Output is correct |
38 |
Correct |
797 ms |
12628 KB |
Output is correct |
39 |
Correct |
405 ms |
12880 KB |
Output is correct |
40 |
Correct |
792 ms |
12816 KB |
Output is correct |
41 |
Correct |
346 ms |
13256 KB |
Output is correct |
42 |
Correct |
340 ms |
13140 KB |
Output is correct |
43 |
Correct |
963 ms |
12596 KB |
Output is correct |
44 |
Correct |
882 ms |
12488 KB |
Output is correct |
45 |
Correct |
1589 ms |
12836 KB |
Output is correct |
46 |
Correct |
1142 ms |
12980 KB |
Output is correct |
47 |
Correct |
1561 ms |
12704 KB |
Output is correct |
48 |
Correct |
553 ms |
12648 KB |
Output is correct |
49 |
Correct |
497 ms |
12452 KB |
Output is correct |
50 |
Correct |
491 ms |
13028 KB |
Output is correct |
51 |
Correct |
446 ms |
12860 KB |
Output is correct |
52 |
Correct |
445 ms |
12764 KB |
Output is correct |
53 |
Correct |
1 ms |
6744 KB |
Output is correct |
54 |
Correct |
1052 ms |
14552 KB |
Output is correct |
55 |
Correct |
589 ms |
14580 KB |
Output is correct |
56 |
Correct |
1025 ms |
14264 KB |
Output is correct |
57 |
Correct |
1179 ms |
14432 KB |
Output is correct |
58 |
Correct |
1108 ms |
14436 KB |
Output is correct |
59 |
Correct |
590 ms |
14676 KB |
Output is correct |
60 |
Correct |
1317 ms |
14412 KB |
Output is correct |
61 |
Correct |
1161 ms |
14316 KB |
Output is correct |
62 |
Correct |
1041 ms |
14400 KB |
Output is correct |
63 |
Correct |
1077 ms |
14316 KB |
Output is correct |
64 |
Correct |
519 ms |
15184 KB |
Output is correct |
65 |
Correct |
464 ms |
15184 KB |
Output is correct |
66 |
Correct |
467 ms |
15140 KB |
Output is correct |
67 |
Correct |
1253 ms |
14444 KB |
Output is correct |
68 |
Correct |
1270 ms |
14228 KB |
Output is correct |
69 |
Correct |
1855 ms |
14252 KB |
Output is correct |
70 |
Correct |
1286 ms |
14920 KB |
Output is correct |
71 |
Correct |
1848 ms |
14152 KB |
Output is correct |
72 |
Correct |
1852 ms |
14168 KB |
Output is correct |
73 |
Correct |
1425 ms |
14720 KB |
Output is correct |
74 |
Correct |
668 ms |
14320 KB |
Output is correct |
75 |
Correct |
685 ms |
14132 KB |
Output is correct |
76 |
Correct |
599 ms |
14768 KB |
Output is correct |
77 |
Correct |
584 ms |
14932 KB |
Output is correct |
78 |
Correct |
1 ms |
6748 KB |
Output is correct |
79 |
Correct |
2202 ms |
13816 KB |
Output is correct |
80 |
Correct |
1630 ms |
14432 KB |
Output is correct |
81 |
Correct |
2086 ms |
13788 KB |
Output is correct |
82 |
Correct |
1486 ms |
14244 KB |
Output is correct |
83 |
Correct |
2137 ms |
13952 KB |
Output is correct |
84 |
Correct |
1529 ms |
14548 KB |
Output is correct |
85 |
Correct |
2191 ms |
13884 KB |
Output is correct |
86 |
Correct |
1484 ms |
14596 KB |
Output is correct |
87 |
Correct |
2085 ms |
13876 KB |
Output is correct |
88 |
Correct |
642 ms |
14928 KB |
Output is correct |
89 |
Correct |
724 ms |
15072 KB |
Output is correct |
90 |
Correct |
1463 ms |
14284 KB |
Output is correct |
91 |
Correct |
655 ms |
15204 KB |
Output is correct |
92 |
Correct |
738 ms |
14928 KB |
Output is correct |
93 |
Correct |
1760 ms |
14200 KB |
Output is correct |
94 |
Correct |
2218 ms |
14360 KB |
Output is correct |
95 |
Correct |
1977 ms |
13980 KB |
Output is correct |
96 |
Correct |
1747 ms |
14768 KB |
Output is correct |
97 |
Correct |
1510 ms |
14312 KB |
Output is correct |
98 |
Correct |
2124 ms |
14404 KB |
Output is correct |
99 |
Correct |
1148 ms |
13904 KB |
Output is correct |
100 |
Correct |
952 ms |
14160 KB |
Output is correct |
101 |
Correct |
793 ms |
14672 KB |
Output is correct |
102 |
Correct |
605 ms |
14676 KB |
Output is correct |
103 |
Correct |
2443 ms |
14144 KB |
Output is correct |
104 |
Correct |
1098 ms |
14676 KB |
Output is correct |
105 |
Correct |
1234 ms |
14404 KB |
Output is correct |
106 |
Correct |
1129 ms |
14484 KB |
Output is correct |
107 |
Correct |
2340 ms |
13648 KB |
Output is correct |
108 |
Correct |
1105 ms |
14712 KB |
Output is correct |
109 |
Correct |
1435 ms |
14396 KB |
Output is correct |
110 |
Correct |
1263 ms |
14676 KB |
Output is correct |
111 |
Correct |
1259 ms |
14416 KB |
Output is correct |
112 |
Correct |
1140 ms |
14364 KB |
Output is correct |
113 |
Correct |
671 ms |
15156 KB |
Output is correct |
114 |
Correct |
504 ms |
15188 KB |
Output is correct |
115 |
Correct |
1611 ms |
14596 KB |
Output is correct |
116 |
Correct |
1382 ms |
14372 KB |
Output is correct |
117 |
Correct |
540 ms |
15264 KB |
Output is correct |
118 |
Correct |
1204 ms |
14364 KB |
Output is correct |
119 |
Correct |
726 ms |
15192 KB |
Output is correct |
120 |
Correct |
1527 ms |
14392 KB |
Output is correct |
121 |
Correct |
1367 ms |
14380 KB |
Output is correct |
122 |
Correct |
2238 ms |
14416 KB |
Output is correct |
123 |
Correct |
1929 ms |
14548 KB |
Output is correct |
124 |
Correct |
1917 ms |
14408 KB |
Output is correct |
125 |
Correct |
1811 ms |
14132 KB |
Output is correct |
126 |
Correct |
1854 ms |
14484 KB |
Output is correct |
127 |
Correct |
1146 ms |
14000 KB |
Output is correct |
128 |
Correct |
769 ms |
14176 KB |
Output is correct |
129 |
Correct |
811 ms |
14560 KB |
Output is correct |
130 |
Correct |
682 ms |
14684 KB |
Output is correct |