/*************************************
* author: marvinthang *
* created: 12.01.2024 20:25:24 *
*************************************/
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define left ___left
#define right ___right
#define TIME (1.0 * clock() / CLOCKS_PER_SEC)
#define MASK(i) (1LL << (i))
#define BIT(x, i) ((x) >> (i) & 1)
#define __builtin_popcount __builtin_popcountll
#define ALL(v) (v).begin(), (v).end()
#define REP(i, n) for (int i = 0, _n = (n); i < _n; ++i)
#define REPD(i, n) for (int i = (n); i-- > 0; )
#define FOR(i, a, b) for (int i = (a), _b = (b); i < _b; ++i)
#define FORD(i, b, a) for (int i = (b), _a = (a); --i >= _a; )
#define FORE(i, a, b) for (int i = (a), _b = (b); i <= _b; ++i)
#define FORDE(i, b, a) for (int i = (b), _a = (a); i >= _a; --i)
#define scan_op(...) istream & operator >> (istream &in, __VA_ARGS__ &u)
#define print_op(...) ostream & operator << (ostream &out, const __VA_ARGS__ &u)
#ifdef LOCAL
#include "debug.h"
#else
#define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
#define DB(...) 23
#define db(...) 23
#define debug(...) 23
#endif
template <class U, class V> scan_op(pair <U, V>) { return in >> u.first >> u.second; }
template <class T> scan_op(vector <T>) { for (size_t i = 0; i < u.size(); ++i) in >> u[i]; return in; }
template <class U, class V> print_op(pair <U, V>) { return out << '(' << u.first << ", " << u.second << ')'; }
template <size_t i, class T> ostream & print_tuple_utils(ostream &out, const T &tup) { if constexpr(i == tuple_size<T>::value) return out << ")"; else return print_tuple_utils<i + 1, T>(out << (i ? ", " : "(") << get<i>(tup), tup); }
template <class ...U> print_op(tuple<U...>) { return print_tuple_utils<0, tuple<U...>>(out, u); }
template <class Con, class = decltype(begin(declval<Con>()))> typename enable_if <!is_same<Con, string>::value, ostream&>::type operator << (ostream &out, const Con &con) { out << '{'; for (__typeof(con.begin()) it = con.begin(); it != con.end(); ++it) out << (it == con.begin() ? "" : ", ") << *it; return out << '}'; }
// end of template
const int INF = 1e9 + 23;
vector <int> a;
void process(void) {
int n; cin >> n;
a.resize(n); cin >> a;
struct Node {
int sum, cnt;
vector <int> pos_l, cnt_l, sum_l, pos_r, cnt_r, sum_r;
Node() {}
Node(int i) {
sum = a[i]; cnt = 1;
pos_l.push_back(i); cnt_l.push_back(0); sum_l.push_back(0);
pos_r.push_back(i); cnt_r.push_back(0); sum_r.push_back(0);
}
void __swap(Node &ot) {
swap(sum, ot.sum); swap(cnt, ot.cnt);
pos_l.swap(ot.pos_r); cnt_l.swap(ot.cnt_r);sum_l.swap(ot.sum_r);
pos_r.swap(ot.pos_l);cnt_r.swap(ot.cnt_l); sum_r.swap(ot.sum_l);
}
Node operator + (Node &ot) {
bool sw = false;
if (sum > ot.sum) sw = true, __swap(ot);
Node res;
res.sum = min(sum + ot.sum, INF);
res.cnt = 0;
res.pos_l = pos_l; res.cnt_l = cnt_l; res.sum_l = sum_l;
res.pos_r = ot.pos_r; res.cnt_r = ot.cnt_r; res.sum_r = ot.sum_r;
REP(i, ot.pos_l.size()) if (sum + ot.sum_l[i] < a[ot.pos_l[i]]) {
res.pos_l.push_back(ot.pos_l[i]);
res.cnt_l.push_back(0);
res.sum_l.push_back(min(sum + ot.sum_l[i], INF));
}
sum_r.push_back(sum); ot.sum_l.push_back(ot.sum);
int tl = 0, tr = 0, pos = cnt_l.size();
auto update = [&] (int cnt) {
while (true) {
if (tl < (int) pos_r.size() && sum_r[tl] + ot.sum_l[tr] >= a[pos_r[tl]]) ++tl;
else if (tr < (int) ot.pos_l.size() && sum_r[tl] + ot.sum_l[tr] >= a[ot.pos_l[tr]]) ++tr;
else break;
}
if (tl == (int) pos_r.size()) {
if (tr == (int) ot.pos_l.size()) res.cnt += cnt;
else {
while (res.pos_l[pos] != ot.pos_l[tr]) ++pos;
res.cnt_l[pos] += cnt;
}
}
};
REP(i, (int) pos_r.size()) {
tl = max(tl, i);
update(cnt_r[i]);
}
tl = pos_r.size(); update(cnt);
tl = tr = 0; pos = cnt_l.size();
REP(i, (int) ot.pos_l.size()) {
tr = max(tr, i);
update(ot.cnt_l[i]);
}
tr = ot.pos_l.size(); update(ot.cnt);
sum_r.pop_back(); ot.sum_l.pop_back();
if (sw) {
res.pos_l.swap(res.pos_r);
res.cnt_l.swap(res.cnt_r);
res.sum_l.swap(res.sum_r);
__swap(ot);
}
return res;
};
};
vector <Node> st(4 * n + 23);
function<void(int, int, int)> build = [&] (int i, int l, int r) {
if (r - l == 1) {
st[i] = Node(l);
return;
}
int m = l + r >> 1;
build(i << 1, l, m);
build(i << 1 | 1, m, r);
st[i] = st[i << 1] + st[i << 1 | 1];
};
function<void(int, int, int, int)> update = [&] (int i, int l, int r, int p) {
if (r - l == 1) {
st[i] = Node(l);
return;
}
int m = l + r >> 1;
if (p < m) update(i << 1, l, m, p);
else update(i << 1 | 1, m, r, p);
st[i] = st[i << 1] + st[i << 1 | 1];
};
function<Node(int, int, int, int, int)> get = [&] (int i, int l, int r, int u, int v) {
if (u <= l && r <= v) return st[i];
int m = l + r >> 1;
Node fl, fr;
if (u < m) fl = get(i << 1, l, m, u, v);
if (v > m) fr = get(i << 1 | 1, m, r, u, v);
if (v <= m) return fl;
if (u >= m) return fr;
return fl + fr;
};
build(1, 0, n);
int q; cin >> q;
while (q--) {
int t, l, r; cin >> t >> l >> r; --l;
if (t == 1) {
a[l] = r;
update(1, 0, n, l);
} else cout << get(1, 0, n, l, r).cnt << '\n';
}
}
int main(void) {
ios_base::sync_with_stdio(false); cin.tie(nullptr); // cout.tie(nullptr);
file("fish2");
// int t; cin >> t; while (t--)
process();
// cerr << "Time elapsed: " << TIME << " s.\n";
return (0^0);
}
Compilation message
fish2.cpp: In lambda function:
fish2.cpp:122:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
122 | int m = l + r >> 1;
| ~~^~~
fish2.cpp: In lambda function:
fish2.cpp:132:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
132 | int m = l + r >> 1;
| ~~^~~
fish2.cpp: In lambda function:
fish2.cpp:139:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
139 | int m = l + r >> 1;
| ~~^~~
fish2.cpp: In function 'int main()':
fish2.cpp:30:61: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
30 | #define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
fish2.cpp:160:2: note: in expansion of macro 'file'
160 | file("fish2");
| ^~~~
fish2.cpp:30:94: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
30 | #define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
fish2.cpp:160:2: note: in expansion of macro 'file'
160 | file("fish2");
| ^~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
3 ms |
860 KB |
Output is correct |
6 |
Correct |
3 ms |
860 KB |
Output is correct |
7 |
Correct |
3 ms |
860 KB |
Output is correct |
8 |
Correct |
4 ms |
860 KB |
Output is correct |
9 |
Correct |
4 ms |
856 KB |
Output is correct |
10 |
Correct |
4 ms |
860 KB |
Output is correct |
11 |
Correct |
3 ms |
860 KB |
Output is correct |
12 |
Correct |
3 ms |
860 KB |
Output is correct |
13 |
Correct |
3 ms |
860 KB |
Output is correct |
14 |
Correct |
3 ms |
860 KB |
Output is correct |
15 |
Correct |
3 ms |
860 KB |
Output is correct |
16 |
Correct |
3 ms |
860 KB |
Output is correct |
17 |
Correct |
3 ms |
860 KB |
Output is correct |
18 |
Correct |
3 ms |
860 KB |
Output is correct |
19 |
Correct |
3 ms |
860 KB |
Output is correct |
20 |
Correct |
3 ms |
860 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
173 ms |
100552 KB |
Output is correct |
3 |
Correct |
162 ms |
99784 KB |
Output is correct |
4 |
Correct |
162 ms |
100436 KB |
Output is correct |
5 |
Correct |
154 ms |
99408 KB |
Output is correct |
6 |
Correct |
152 ms |
97908 KB |
Output is correct |
7 |
Correct |
155 ms |
97836 KB |
Output is correct |
8 |
Correct |
171 ms |
97872 KB |
Output is correct |
9 |
Correct |
158 ms |
97924 KB |
Output is correct |
10 |
Correct |
167 ms |
100432 KB |
Output is correct |
11 |
Correct |
157 ms |
98900 KB |
Output is correct |
12 |
Correct |
149 ms |
97692 KB |
Output is correct |
13 |
Correct |
156 ms |
98036 KB |
Output is correct |
14 |
Correct |
162 ms |
97720 KB |
Output is correct |
15 |
Correct |
170 ms |
97788 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
3 ms |
860 KB |
Output is correct |
6 |
Correct |
3 ms |
860 KB |
Output is correct |
7 |
Correct |
3 ms |
860 KB |
Output is correct |
8 |
Correct |
4 ms |
860 KB |
Output is correct |
9 |
Correct |
4 ms |
856 KB |
Output is correct |
10 |
Correct |
4 ms |
860 KB |
Output is correct |
11 |
Correct |
3 ms |
860 KB |
Output is correct |
12 |
Correct |
3 ms |
860 KB |
Output is correct |
13 |
Correct |
3 ms |
860 KB |
Output is correct |
14 |
Correct |
3 ms |
860 KB |
Output is correct |
15 |
Correct |
3 ms |
860 KB |
Output is correct |
16 |
Correct |
3 ms |
860 KB |
Output is correct |
17 |
Correct |
3 ms |
860 KB |
Output is correct |
18 |
Correct |
3 ms |
860 KB |
Output is correct |
19 |
Correct |
3 ms |
860 KB |
Output is correct |
20 |
Correct |
3 ms |
860 KB |
Output is correct |
21 |
Correct |
1 ms |
348 KB |
Output is correct |
22 |
Correct |
173 ms |
100552 KB |
Output is correct |
23 |
Correct |
162 ms |
99784 KB |
Output is correct |
24 |
Correct |
162 ms |
100436 KB |
Output is correct |
25 |
Correct |
154 ms |
99408 KB |
Output is correct |
26 |
Correct |
152 ms |
97908 KB |
Output is correct |
27 |
Correct |
155 ms |
97836 KB |
Output is correct |
28 |
Correct |
171 ms |
97872 KB |
Output is correct |
29 |
Correct |
158 ms |
97924 KB |
Output is correct |
30 |
Correct |
167 ms |
100432 KB |
Output is correct |
31 |
Correct |
157 ms |
98900 KB |
Output is correct |
32 |
Correct |
149 ms |
97692 KB |
Output is correct |
33 |
Correct |
156 ms |
98036 KB |
Output is correct |
34 |
Correct |
162 ms |
97720 KB |
Output is correct |
35 |
Correct |
170 ms |
97788 KB |
Output is correct |
36 |
Correct |
202 ms |
100600 KB |
Output is correct |
37 |
Correct |
173 ms |
99500 KB |
Output is correct |
38 |
Correct |
194 ms |
99924 KB |
Output is correct |
39 |
Correct |
210 ms |
101108 KB |
Output is correct |
40 |
Correct |
218 ms |
99896 KB |
Output is correct |
41 |
Correct |
205 ms |
98696 KB |
Output is correct |
42 |
Correct |
178 ms |
98788 KB |
Output is correct |
43 |
Correct |
176 ms |
98188 KB |
Output is correct |
44 |
Correct |
198 ms |
98176 KB |
Output is correct |
45 |
Correct |
206 ms |
101300 KB |
Output is correct |
46 |
Correct |
178 ms |
101192 KB |
Output is correct |
47 |
Correct |
182 ms |
99252 KB |
Output is correct |
48 |
Correct |
192 ms |
98196 KB |
Output is correct |
49 |
Correct |
197 ms |
98128 KB |
Output is correct |
50 |
Correct |
170 ms |
98468 KB |
Output is correct |
51 |
Correct |
187 ms |
98468 KB |
Output is correct |
52 |
Correct |
197 ms |
98464 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
173 ms |
100552 KB |
Output is correct |
3 |
Correct |
162 ms |
99784 KB |
Output is correct |
4 |
Correct |
162 ms |
100436 KB |
Output is correct |
5 |
Correct |
154 ms |
99408 KB |
Output is correct |
6 |
Correct |
152 ms |
97908 KB |
Output is correct |
7 |
Correct |
155 ms |
97836 KB |
Output is correct |
8 |
Correct |
171 ms |
97872 KB |
Output is correct |
9 |
Correct |
158 ms |
97924 KB |
Output is correct |
10 |
Correct |
167 ms |
100432 KB |
Output is correct |
11 |
Correct |
157 ms |
98900 KB |
Output is correct |
12 |
Correct |
149 ms |
97692 KB |
Output is correct |
13 |
Correct |
156 ms |
98036 KB |
Output is correct |
14 |
Correct |
162 ms |
97720 KB |
Output is correct |
15 |
Correct |
170 ms |
97788 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1438 ms |
101020 KB |
Output is correct |
18 |
Correct |
1512 ms |
103252 KB |
Output is correct |
19 |
Correct |
1478 ms |
101744 KB |
Output is correct |
20 |
Correct |
1461 ms |
101516 KB |
Output is correct |
21 |
Correct |
1395 ms |
101632 KB |
Output is correct |
22 |
Correct |
1440 ms |
103332 KB |
Output is correct |
23 |
Correct |
1442 ms |
101652 KB |
Output is correct |
24 |
Correct |
1456 ms |
101476 KB |
Output is correct |
25 |
Correct |
1410 ms |
101764 KB |
Output is correct |
26 |
Correct |
1496 ms |
101688 KB |
Output is correct |
27 |
Correct |
1218 ms |
100808 KB |
Output is correct |
28 |
Correct |
1184 ms |
100692 KB |
Output is correct |
29 |
Correct |
1238 ms |
101036 KB |
Output is correct |
30 |
Correct |
1366 ms |
99900 KB |
Output is correct |
31 |
Correct |
1330 ms |
99748 KB |
Output is correct |
32 |
Correct |
1548 ms |
101092 KB |
Output is correct |
33 |
Correct |
1551 ms |
103176 KB |
Output is correct |
34 |
Correct |
1626 ms |
101004 KB |
Output is correct |
35 |
Correct |
1394 ms |
101024 KB |
Output is correct |
36 |
Correct |
1565 ms |
103252 KB |
Output is correct |
37 |
Correct |
1142 ms |
99756 KB |
Output is correct |
38 |
Correct |
1083 ms |
99944 KB |
Output is correct |
39 |
Correct |
1232 ms |
100448 KB |
Output is correct |
40 |
Correct |
1223 ms |
100816 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
173 ms |
100552 KB |
Output is correct |
3 |
Correct |
162 ms |
99784 KB |
Output is correct |
4 |
Correct |
162 ms |
100436 KB |
Output is correct |
5 |
Correct |
154 ms |
99408 KB |
Output is correct |
6 |
Correct |
152 ms |
97908 KB |
Output is correct |
7 |
Correct |
155 ms |
97836 KB |
Output is correct |
8 |
Correct |
171 ms |
97872 KB |
Output is correct |
9 |
Correct |
158 ms |
97924 KB |
Output is correct |
10 |
Correct |
167 ms |
100432 KB |
Output is correct |
11 |
Correct |
157 ms |
98900 KB |
Output is correct |
12 |
Correct |
149 ms |
97692 KB |
Output is correct |
13 |
Correct |
156 ms |
98036 KB |
Output is correct |
14 |
Correct |
162 ms |
97720 KB |
Output is correct |
15 |
Correct |
170 ms |
97788 KB |
Output is correct |
16 |
Correct |
1 ms |
344 KB |
Output is correct |
17 |
Correct |
1165 ms |
101520 KB |
Output is correct |
18 |
Correct |
1482 ms |
102176 KB |
Output is correct |
19 |
Correct |
703 ms |
101312 KB |
Output is correct |
20 |
Correct |
1071 ms |
101660 KB |
Output is correct |
21 |
Correct |
1094 ms |
102492 KB |
Output is correct |
22 |
Correct |
1436 ms |
101748 KB |
Output is correct |
23 |
Correct |
849 ms |
101024 KB |
Output is correct |
24 |
Correct |
1272 ms |
101700 KB |
Output is correct |
25 |
Correct |
757 ms |
101100 KB |
Output is correct |
26 |
Correct |
927 ms |
100436 KB |
Output is correct |
27 |
Correct |
1338 ms |
100776 KB |
Output is correct |
28 |
Correct |
1018 ms |
100268 KB |
Output is correct |
29 |
Correct |
1028 ms |
100608 KB |
Output is correct |
30 |
Correct |
1279 ms |
100620 KB |
Output is correct |
31 |
Correct |
1340 ms |
100188 KB |
Output is correct |
32 |
Correct |
1507 ms |
101212 KB |
Output is correct |
33 |
Correct |
753 ms |
100492 KB |
Output is correct |
34 |
Correct |
1369 ms |
102740 KB |
Output is correct |
35 |
Correct |
621 ms |
102484 KB |
Output is correct |
36 |
Correct |
1276 ms |
101048 KB |
Output is correct |
37 |
Correct |
1148 ms |
99844 KB |
Output is correct |
38 |
Correct |
733 ms |
100032 KB |
Output is correct |
39 |
Correct |
905 ms |
100276 KB |
Output is correct |
40 |
Correct |
520 ms |
100732 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
3 ms |
860 KB |
Output is correct |
6 |
Correct |
3 ms |
860 KB |
Output is correct |
7 |
Correct |
3 ms |
860 KB |
Output is correct |
8 |
Correct |
4 ms |
860 KB |
Output is correct |
9 |
Correct |
4 ms |
856 KB |
Output is correct |
10 |
Correct |
4 ms |
860 KB |
Output is correct |
11 |
Correct |
3 ms |
860 KB |
Output is correct |
12 |
Correct |
3 ms |
860 KB |
Output is correct |
13 |
Correct |
3 ms |
860 KB |
Output is correct |
14 |
Correct |
3 ms |
860 KB |
Output is correct |
15 |
Correct |
3 ms |
860 KB |
Output is correct |
16 |
Correct |
3 ms |
860 KB |
Output is correct |
17 |
Correct |
3 ms |
860 KB |
Output is correct |
18 |
Correct |
3 ms |
860 KB |
Output is correct |
19 |
Correct |
3 ms |
860 KB |
Output is correct |
20 |
Correct |
3 ms |
860 KB |
Output is correct |
21 |
Correct |
1 ms |
348 KB |
Output is correct |
22 |
Correct |
173 ms |
100552 KB |
Output is correct |
23 |
Correct |
162 ms |
99784 KB |
Output is correct |
24 |
Correct |
162 ms |
100436 KB |
Output is correct |
25 |
Correct |
154 ms |
99408 KB |
Output is correct |
26 |
Correct |
152 ms |
97908 KB |
Output is correct |
27 |
Correct |
155 ms |
97836 KB |
Output is correct |
28 |
Correct |
171 ms |
97872 KB |
Output is correct |
29 |
Correct |
158 ms |
97924 KB |
Output is correct |
30 |
Correct |
167 ms |
100432 KB |
Output is correct |
31 |
Correct |
157 ms |
98900 KB |
Output is correct |
32 |
Correct |
149 ms |
97692 KB |
Output is correct |
33 |
Correct |
156 ms |
98036 KB |
Output is correct |
34 |
Correct |
162 ms |
97720 KB |
Output is correct |
35 |
Correct |
170 ms |
97788 KB |
Output is correct |
36 |
Correct |
202 ms |
100600 KB |
Output is correct |
37 |
Correct |
173 ms |
99500 KB |
Output is correct |
38 |
Correct |
194 ms |
99924 KB |
Output is correct |
39 |
Correct |
210 ms |
101108 KB |
Output is correct |
40 |
Correct |
218 ms |
99896 KB |
Output is correct |
41 |
Correct |
205 ms |
98696 KB |
Output is correct |
42 |
Correct |
178 ms |
98788 KB |
Output is correct |
43 |
Correct |
176 ms |
98188 KB |
Output is correct |
44 |
Correct |
198 ms |
98176 KB |
Output is correct |
45 |
Correct |
206 ms |
101300 KB |
Output is correct |
46 |
Correct |
178 ms |
101192 KB |
Output is correct |
47 |
Correct |
182 ms |
99252 KB |
Output is correct |
48 |
Correct |
192 ms |
98196 KB |
Output is correct |
49 |
Correct |
197 ms |
98128 KB |
Output is correct |
50 |
Correct |
170 ms |
98468 KB |
Output is correct |
51 |
Correct |
187 ms |
98468 KB |
Output is correct |
52 |
Correct |
197 ms |
98464 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
1438 ms |
101020 KB |
Output is correct |
55 |
Correct |
1512 ms |
103252 KB |
Output is correct |
56 |
Correct |
1478 ms |
101744 KB |
Output is correct |
57 |
Correct |
1461 ms |
101516 KB |
Output is correct |
58 |
Correct |
1395 ms |
101632 KB |
Output is correct |
59 |
Correct |
1440 ms |
103332 KB |
Output is correct |
60 |
Correct |
1442 ms |
101652 KB |
Output is correct |
61 |
Correct |
1456 ms |
101476 KB |
Output is correct |
62 |
Correct |
1410 ms |
101764 KB |
Output is correct |
63 |
Correct |
1496 ms |
101688 KB |
Output is correct |
64 |
Correct |
1218 ms |
100808 KB |
Output is correct |
65 |
Correct |
1184 ms |
100692 KB |
Output is correct |
66 |
Correct |
1238 ms |
101036 KB |
Output is correct |
67 |
Correct |
1366 ms |
99900 KB |
Output is correct |
68 |
Correct |
1330 ms |
99748 KB |
Output is correct |
69 |
Correct |
1548 ms |
101092 KB |
Output is correct |
70 |
Correct |
1551 ms |
103176 KB |
Output is correct |
71 |
Correct |
1626 ms |
101004 KB |
Output is correct |
72 |
Correct |
1394 ms |
101024 KB |
Output is correct |
73 |
Correct |
1565 ms |
103252 KB |
Output is correct |
74 |
Correct |
1142 ms |
99756 KB |
Output is correct |
75 |
Correct |
1083 ms |
99944 KB |
Output is correct |
76 |
Correct |
1232 ms |
100448 KB |
Output is correct |
77 |
Correct |
1223 ms |
100816 KB |
Output is correct |
78 |
Correct |
1 ms |
344 KB |
Output is correct |
79 |
Correct |
1165 ms |
101520 KB |
Output is correct |
80 |
Correct |
1482 ms |
102176 KB |
Output is correct |
81 |
Correct |
703 ms |
101312 KB |
Output is correct |
82 |
Correct |
1071 ms |
101660 KB |
Output is correct |
83 |
Correct |
1094 ms |
102492 KB |
Output is correct |
84 |
Correct |
1436 ms |
101748 KB |
Output is correct |
85 |
Correct |
849 ms |
101024 KB |
Output is correct |
86 |
Correct |
1272 ms |
101700 KB |
Output is correct |
87 |
Correct |
757 ms |
101100 KB |
Output is correct |
88 |
Correct |
927 ms |
100436 KB |
Output is correct |
89 |
Correct |
1338 ms |
100776 KB |
Output is correct |
90 |
Correct |
1018 ms |
100268 KB |
Output is correct |
91 |
Correct |
1028 ms |
100608 KB |
Output is correct |
92 |
Correct |
1279 ms |
100620 KB |
Output is correct |
93 |
Correct |
1340 ms |
100188 KB |
Output is correct |
94 |
Correct |
1507 ms |
101212 KB |
Output is correct |
95 |
Correct |
753 ms |
100492 KB |
Output is correct |
96 |
Correct |
1369 ms |
102740 KB |
Output is correct |
97 |
Correct |
621 ms |
102484 KB |
Output is correct |
98 |
Correct |
1276 ms |
101048 KB |
Output is correct |
99 |
Correct |
1148 ms |
99844 KB |
Output is correct |
100 |
Correct |
733 ms |
100032 KB |
Output is correct |
101 |
Correct |
905 ms |
100276 KB |
Output is correct |
102 |
Correct |
520 ms |
100732 KB |
Output is correct |
103 |
Correct |
1029 ms |
101132 KB |
Output is correct |
104 |
Correct |
1588 ms |
103108 KB |
Output is correct |
105 |
Correct |
1401 ms |
101760 KB |
Output is correct |
106 |
Correct |
1450 ms |
101940 KB |
Output is correct |
107 |
Correct |
1026 ms |
101148 KB |
Output is correct |
108 |
Correct |
1569 ms |
102936 KB |
Output is correct |
109 |
Correct |
1317 ms |
101508 KB |
Output is correct |
110 |
Correct |
1393 ms |
101884 KB |
Output is correct |
111 |
Correct |
1376 ms |
101816 KB |
Output is correct |
112 |
Correct |
1447 ms |
101920 KB |
Output is correct |
113 |
Correct |
1350 ms |
100756 KB |
Output is correct |
114 |
Correct |
1254 ms |
100792 KB |
Output is correct |
115 |
Correct |
1484 ms |
100236 KB |
Output is correct |
116 |
Correct |
1501 ms |
100224 KB |
Output is correct |
117 |
Correct |
1230 ms |
100976 KB |
Output is correct |
118 |
Correct |
1394 ms |
99960 KB |
Output is correct |
119 |
Correct |
1408 ms |
100512 KB |
Output is correct |
120 |
Correct |
1462 ms |
100180 KB |
Output is correct |
121 |
Correct |
1402 ms |
99924 KB |
Output is correct |
122 |
Correct |
1436 ms |
101220 KB |
Output is correct |
123 |
Correct |
1125 ms |
101292 KB |
Output is correct |
124 |
Correct |
1466 ms |
100948 KB |
Output is correct |
125 |
Correct |
1375 ms |
100796 KB |
Output is correct |
126 |
Correct |
1482 ms |
101336 KB |
Output is correct |
127 |
Correct |
1421 ms |
99964 KB |
Output is correct |
128 |
Correct |
1134 ms |
99900 KB |
Output is correct |
129 |
Correct |
1402 ms |
100624 KB |
Output is correct |
130 |
Correct |
1307 ms |
100356 KB |
Output is correct |