#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int n, a[100100];
struct Seg1{
ll tree[200200], sz;
void init(int n){
sz = n;
for (int i=sz;i<sz*2;i++) tree[i] = a[i-sz];
for (int i=sz-1;i;i--) tree[i] = tree[i<<1] + tree[i<<1|1];
}
void update(int p, int x){
for (tree[p+=sz]=x;p>1;p>>=1) tree[p>>1] = tree[p] + tree[p^1];
}
ll query(int l, int r){
++r;
ll ret = 0;
for (l+=sz, r+=sz;l<r;l>>=1, r>>=1){
if (l&1) ret += tree[l++];
if (r&1) ret += tree[--r];
}
return ret;
}
}tree1;
struct Seg2{
int tree[400400];
void init(int i, int l, int r){
if (l==r) {tree[i] = a[l]; return;}
int m = (l+r)>>1;
init(i<<1, l, m); init(i<<1|1, m+1, r);
tree[i] = max(tree[i<<1], tree[i<<1|1]);
}
void update(int i, int l, int r, int p, int x){
if (p<l || r<p) return;
if (l==r) {tree[i] = x; return;}
int m = (l+r)>>1;
update(i<<1, l, m, p, x); update(i<<1|1, m+1, r, p, x);
tree[i] = max(tree[i<<1], tree[i<<1|1]);
}
int left_bound(int i, int l, int r, int s, int e, ll x){
if (r<s || e<l) return -1;
if (tree[i] <= x) return -1;
if (l==r) return l;
int m = (l+r)>>1;
int tmp = left_bound(i<<1|1, m+1, r, s, e, x);
if (tmp!=-1) return tmp;
return left_bound(i<<1, l, m, s, e, x);
}
int right_bound(int i, int l, int r, int s, int e, ll x){
if (r<s || e<l) return -1;
if (tree[i] <= x) return -1;
if (l==r) return l;
int m = (l+r)>>1;
int tmp = right_bound(i<<1, l, m, s, e, x);
if (tmp!=-1) return tmp;
return right_bound(i<<1|1, m+1, r, s, e, x);
}
}tree2;
struct Node{
int mn, cnt;
Node(){}
Node(int _mn, int _cnt): mn(_mn), cnt(_cnt) {}
Node operator + (const Node &N) const{
if (mn < N.mn) return *this;
if (mn > N.mn) return N;
return Node(mn, cnt+N.cnt);
}
};
struct Seg3{
Node tree[400400];
int lazy[400400];
void init(int i, int l, int r){
if (l==r) {tree[i] = Node(0, 1); return;}
int m = (l+r)>>1;
init(i<<1, l, m); init(i<<1|1, m+1, r);
tree[i] = tree[i<<1] + tree[i<<1|1];
}
void propagate(int i, int l, int r){
tree[i].mn += lazy[i];
if (l!=r){
lazy[i<<1] += lazy[i];
lazy[i<<1|1] += lazy[i];
}
lazy[i] = 0;
}
void update(int i, int l, int r, int s, int e, int x){
propagate(i, l, r);
if (r<s || e<l) return;
if (s<=l && r<=e){
lazy[i] += x;
propagate(i, l, r);
return;
}
int m = (l+r)>>1;
update(i<<1, l, m, s, e, x); update(i<<1|1, m+1, r, s, e, x);
tree[i] = tree[i<<1] + tree[i<<1|1];
}
Node query(int i, int l, int r, int s, int e){
propagate(i, l, r);
if (r<s || e<l) return Node(1e9, 0);
if (s<=l && r<=e) return tree[i];
int m = (l+r)>>1;
return query(i<<1, l, m, s, e) + query(i<<1|1, m+1, r, s, e);
}
}tree3;
struct Seg4{
vector<pair<int, int>> tree[400400];
void update(int i, int l, int r, int s, int e){
if (l==r) {
tree[i].emplace_back(s, e);
tree3.update(1, 1, n, s, e, 1);
return;
}
int m = (l+r)>>1;
if (e<=m) update(i<<1, l, m, s, e);
else if (m+1<=s) update(i<<1|1, m+1, r, s, e);
else{
tree[i].emplace_back(s, e);
tree3.update(1, 1, n, s, e, 1);
}
}
void erase(int i, int l, int r, int p){
while(!tree[i].empty() && tree[i].back().first <= p && p <= tree[i].back().second){
tree3.update(1, 1, n, tree[i].back().first, tree[i].back().second, -1);
tree[i].pop_back();
}
if (l==r) return;
int m = (l+r)>>1;
if (p<=m) erase(i<<1, l, m, p);
else erase(i<<1|1, m+1, r, p);
}
void debug(int i, int l, int r){
printf("[%d, %d]: ", l, r);
for (auto &[x, y]:tree[i]) printf("[%d, %d] / ", x, y);
printf("\n");
if (l==r) return;
int m = (l+r)>>1;
debug(i<<1, l, m);
debug(i<<1|1, m+1, r);
}
}tree4;
bool cmp(pair<int, int> &x, pair<int, int> &y){return x.second-x.first < y.second-y.first;}
bool ok(int l, int r, int s, int e){
ll L = s==l?1e18:a[s-1], R = e==r?1e18:a[e+1];
ll S = tree1.query(s, e);
return S<L && S<R;
}
vector<int> getL(int l, int r, int s){
vector<int> ret;
int cur = s;
while(true){
int nxt = tree2.left_bound(1, 1, n, l, cur-1, tree1.query(cur, s));
if (nxt==-1) break;
ret.push_back(nxt+1);
cur = nxt;
}
ret.push_back(l);
return ret;
}
vector<int> getR(int l, int r, int s){
vector<int> ret;
int cur = s;
while(true){
int nxt = tree2.right_bound(1, 1, n, cur+1, r, tree1.query(s, cur));
if (nxt==-1) break;
//printf(" %d %d -> %d\n", s, cur, nxt);
ret.push_back(nxt-1);
cur = nxt;
}
ret.push_back(r);
return ret;
}
void refresh(int x, vector<pair<int, int>> &P){
if (x<1 || x>n) return;
tree4.erase(1, 1, n, x);
auto L = getL(1, n, x);
auto R = getR(1, n, x);
for (auto &l:L){
for (auto &r:R) if (ok(1, n, l, r)){
P.emplace_back(l, r);
}
}
}
void update(int x, int y){
tree1.update(x, y);
tree2.update(1, 1, n, x, y);
a[x] = y;
vector<pair<int, int>> P;
refresh(x-1, P);
refresh(x, P);
refresh(x+1, P);
sort(P.begin(), P.end(), cmp);
P.erase(unique(P.begin(), P.end()), P.end());
for (auto &[l, r]:P) tree4.update(1, 1, n, l, r);
//tree4.debug(1, 1, n);
}
int query(int l, int r){
auto R0 = getR(l, r-1, l);
auto L0 = getL(l+1, r, r);
int nl = l, nr = r;
for (auto &x:R0) if (ok(l, r, l, x)) nl = x+1;
for (auto &x:L0) if (ok(l, r, x, r)) nr = x-1;
return tree3.query(1, 1, n, nl, nr).cnt;
}
int main(){
scanf("%d", &n);
for (int i=1;i<=n;i++) scanf("%d", a+i);
tree1.init(n+1);
tree2.init(1, 1, n);
tree3.init(1, 1, n);
vector<pair<int, int>> P;
for (int i=1;i<=n;i++){
//printf("ok %d\n", i);
auto R = getR(1, n, i);
for (auto &x:R) if (ok(1, n, i, x)){
P.emplace_back(i, x);
//printf("%d %d\n", i, x);
}
}
sort(P.begin(), P.end(), cmp);
for (auto &[l, r]:P) tree4.update(1, 1, n, l, r);
//tree4.debug(1, 1, n);
int q;
scanf("%d", &q);
while(q--){
int op, x, y;
scanf("%d %d %d", &op, &x, &y);
if (op==1) update(x, y);
else printf("%d\n", query(x, y));
}
return 0;
}
Compilation message
fish2.cpp: In function 'int main()':
fish2.cpp:233:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
233 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
fish2.cpp:234:33: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
234 | for (int i=1;i<=n;i++) scanf("%d", a+i);
| ~~~~~^~~~~~~~~~~
fish2.cpp:255:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
255 | scanf("%d", &q);
| ~~~~~^~~~~~~~~~
fish2.cpp:258:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
258 | scanf("%d %d %d", &op, &x, &y);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
9708 KB |
Output is correct |
2 |
Correct |
4 ms |
9684 KB |
Output is correct |
3 |
Correct |
4 ms |
9700 KB |
Output is correct |
4 |
Correct |
5 ms |
9632 KB |
Output is correct |
5 |
Correct |
10 ms |
9712 KB |
Output is correct |
6 |
Correct |
7 ms |
9684 KB |
Output is correct |
7 |
Correct |
9 ms |
9684 KB |
Output is correct |
8 |
Correct |
8 ms |
9716 KB |
Output is correct |
9 |
Correct |
7 ms |
9716 KB |
Output is correct |
10 |
Correct |
7 ms |
9684 KB |
Output is correct |
11 |
Correct |
5 ms |
9684 KB |
Output is correct |
12 |
Correct |
7 ms |
9684 KB |
Output is correct |
13 |
Correct |
6 ms |
9712 KB |
Output is correct |
14 |
Correct |
6 ms |
9684 KB |
Output is correct |
15 |
Correct |
8 ms |
9712 KB |
Output is correct |
16 |
Correct |
6 ms |
9712 KB |
Output is correct |
17 |
Correct |
7 ms |
9684 KB |
Output is correct |
18 |
Correct |
6 ms |
9684 KB |
Output is correct |
19 |
Correct |
6 ms |
9684 KB |
Output is correct |
20 |
Correct |
6 ms |
9684 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
9684 KB |
Output is correct |
2 |
Correct |
222 ms |
18332 KB |
Output is correct |
3 |
Correct |
322 ms |
18148 KB |
Output is correct |
4 |
Correct |
229 ms |
18300 KB |
Output is correct |
5 |
Correct |
316 ms |
18124 KB |
Output is correct |
6 |
Correct |
90 ms |
18420 KB |
Output is correct |
7 |
Correct |
195 ms |
16888 KB |
Output is correct |
8 |
Correct |
63 ms |
18372 KB |
Output is correct |
9 |
Correct |
163 ms |
16896 KB |
Output is correct |
10 |
Correct |
165 ms |
17288 KB |
Output is correct |
11 |
Correct |
239 ms |
17080 KB |
Output is correct |
12 |
Correct |
111 ms |
17508 KB |
Output is correct |
13 |
Correct |
98 ms |
17420 KB |
Output is correct |
14 |
Correct |
80 ms |
18872 KB |
Output is correct |
15 |
Correct |
93 ms |
18776 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
9708 KB |
Output is correct |
2 |
Correct |
4 ms |
9684 KB |
Output is correct |
3 |
Correct |
4 ms |
9700 KB |
Output is correct |
4 |
Correct |
5 ms |
9632 KB |
Output is correct |
5 |
Correct |
10 ms |
9712 KB |
Output is correct |
6 |
Correct |
7 ms |
9684 KB |
Output is correct |
7 |
Correct |
9 ms |
9684 KB |
Output is correct |
8 |
Correct |
8 ms |
9716 KB |
Output is correct |
9 |
Correct |
7 ms |
9716 KB |
Output is correct |
10 |
Correct |
7 ms |
9684 KB |
Output is correct |
11 |
Correct |
5 ms |
9684 KB |
Output is correct |
12 |
Correct |
7 ms |
9684 KB |
Output is correct |
13 |
Correct |
6 ms |
9712 KB |
Output is correct |
14 |
Correct |
6 ms |
9684 KB |
Output is correct |
15 |
Correct |
8 ms |
9712 KB |
Output is correct |
16 |
Correct |
6 ms |
9712 KB |
Output is correct |
17 |
Correct |
7 ms |
9684 KB |
Output is correct |
18 |
Correct |
6 ms |
9684 KB |
Output is correct |
19 |
Correct |
6 ms |
9684 KB |
Output is correct |
20 |
Correct |
6 ms |
9684 KB |
Output is correct |
21 |
Correct |
4 ms |
9684 KB |
Output is correct |
22 |
Correct |
222 ms |
18332 KB |
Output is correct |
23 |
Correct |
322 ms |
18148 KB |
Output is correct |
24 |
Correct |
229 ms |
18300 KB |
Output is correct |
25 |
Correct |
316 ms |
18124 KB |
Output is correct |
26 |
Correct |
90 ms |
18420 KB |
Output is correct |
27 |
Correct |
195 ms |
16888 KB |
Output is correct |
28 |
Correct |
63 ms |
18372 KB |
Output is correct |
29 |
Correct |
163 ms |
16896 KB |
Output is correct |
30 |
Correct |
165 ms |
17288 KB |
Output is correct |
31 |
Correct |
239 ms |
17080 KB |
Output is correct |
32 |
Correct |
111 ms |
17508 KB |
Output is correct |
33 |
Correct |
98 ms |
17420 KB |
Output is correct |
34 |
Correct |
80 ms |
18872 KB |
Output is correct |
35 |
Correct |
93 ms |
18776 KB |
Output is correct |
36 |
Correct |
248 ms |
18504 KB |
Output is correct |
37 |
Correct |
328 ms |
18176 KB |
Output is correct |
38 |
Correct |
331 ms |
17884 KB |
Output is correct |
39 |
Correct |
238 ms |
18496 KB |
Output is correct |
40 |
Correct |
319 ms |
17880 KB |
Output is correct |
41 |
Correct |
66 ms |
18404 KB |
Output is correct |
42 |
Correct |
67 ms |
18456 KB |
Output is correct |
43 |
Correct |
161 ms |
16928 KB |
Output is correct |
44 |
Correct |
187 ms |
16900 KB |
Output is correct |
45 |
Correct |
184 ms |
17432 KB |
Output is correct |
46 |
Correct |
175 ms |
17316 KB |
Output is correct |
47 |
Correct |
221 ms |
16588 KB |
Output is correct |
48 |
Correct |
86 ms |
17536 KB |
Output is correct |
49 |
Correct |
100 ms |
17524 KB |
Output is correct |
50 |
Correct |
83 ms |
18924 KB |
Output is correct |
51 |
Correct |
109 ms |
18752 KB |
Output is correct |
52 |
Correct |
85 ms |
18988 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
9684 KB |
Output is correct |
2 |
Correct |
222 ms |
18332 KB |
Output is correct |
3 |
Correct |
322 ms |
18148 KB |
Output is correct |
4 |
Correct |
229 ms |
18300 KB |
Output is correct |
5 |
Correct |
316 ms |
18124 KB |
Output is correct |
6 |
Correct |
90 ms |
18420 KB |
Output is correct |
7 |
Correct |
195 ms |
16888 KB |
Output is correct |
8 |
Correct |
63 ms |
18372 KB |
Output is correct |
9 |
Correct |
163 ms |
16896 KB |
Output is correct |
10 |
Correct |
165 ms |
17288 KB |
Output is correct |
11 |
Correct |
239 ms |
17080 KB |
Output is correct |
12 |
Correct |
111 ms |
17508 KB |
Output is correct |
13 |
Correct |
98 ms |
17420 KB |
Output is correct |
14 |
Correct |
80 ms |
18872 KB |
Output is correct |
15 |
Correct |
93 ms |
18776 KB |
Output is correct |
16 |
Correct |
4 ms |
9712 KB |
Output is correct |
17 |
Correct |
728 ms |
19804 KB |
Output is correct |
18 |
Correct |
533 ms |
20204 KB |
Output is correct |
19 |
Correct |
732 ms |
19932 KB |
Output is correct |
20 |
Correct |
746 ms |
19824 KB |
Output is correct |
21 |
Correct |
708 ms |
19868 KB |
Output is correct |
22 |
Correct |
541 ms |
20296 KB |
Output is correct |
23 |
Correct |
692 ms |
19688 KB |
Output is correct |
24 |
Correct |
783 ms |
20160 KB |
Output is correct |
25 |
Correct |
740 ms |
19988 KB |
Output is correct |
26 |
Correct |
783 ms |
20052 KB |
Output is correct |
27 |
Correct |
225 ms |
20300 KB |
Output is correct |
28 |
Correct |
219 ms |
20272 KB |
Output is correct |
29 |
Correct |
230 ms |
20248 KB |
Output is correct |
30 |
Correct |
560 ms |
18504 KB |
Output is correct |
31 |
Correct |
600 ms |
18520 KB |
Output is correct |
32 |
Correct |
817 ms |
18916 KB |
Output is correct |
33 |
Correct |
431 ms |
19004 KB |
Output is correct |
34 |
Correct |
832 ms |
18608 KB |
Output is correct |
35 |
Correct |
596 ms |
18288 KB |
Output is correct |
36 |
Correct |
612 ms |
19120 KB |
Output is correct |
37 |
Correct |
277 ms |
19140 KB |
Output is correct |
38 |
Correct |
271 ms |
19016 KB |
Output is correct |
39 |
Correct |
262 ms |
20820 KB |
Output is correct |
40 |
Correct |
266 ms |
20608 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
9684 KB |
Output is correct |
2 |
Correct |
222 ms |
18332 KB |
Output is correct |
3 |
Correct |
322 ms |
18148 KB |
Output is correct |
4 |
Correct |
229 ms |
18300 KB |
Output is correct |
5 |
Correct |
316 ms |
18124 KB |
Output is correct |
6 |
Correct |
90 ms |
18420 KB |
Output is correct |
7 |
Correct |
195 ms |
16888 KB |
Output is correct |
8 |
Correct |
63 ms |
18372 KB |
Output is correct |
9 |
Correct |
163 ms |
16896 KB |
Output is correct |
10 |
Correct |
165 ms |
17288 KB |
Output is correct |
11 |
Correct |
239 ms |
17080 KB |
Output is correct |
12 |
Correct |
111 ms |
17508 KB |
Output is correct |
13 |
Correct |
98 ms |
17420 KB |
Output is correct |
14 |
Correct |
80 ms |
18872 KB |
Output is correct |
15 |
Correct |
93 ms |
18776 KB |
Output is correct |
16 |
Correct |
5 ms |
9712 KB |
Output is correct |
17 |
Correct |
1597 ms |
19572 KB |
Output is correct |
18 |
Correct |
1105 ms |
22632 KB |
Output is correct |
19 |
Correct |
1364 ms |
19280 KB |
Output is correct |
20 |
Correct |
980 ms |
22360 KB |
Output is correct |
21 |
Correct |
1551 ms |
19736 KB |
Output is correct |
22 |
Correct |
1120 ms |
22504 KB |
Output is correct |
23 |
Correct |
1563 ms |
19476 KB |
Output is correct |
24 |
Correct |
1069 ms |
22448 KB |
Output is correct |
25 |
Correct |
1443 ms |
19252 KB |
Output is correct |
26 |
Correct |
404 ms |
20916 KB |
Output is correct |
27 |
Correct |
502 ms |
21324 KB |
Output is correct |
28 |
Correct |
729 ms |
20496 KB |
Output is correct |
29 |
Correct |
430 ms |
20996 KB |
Output is correct |
30 |
Correct |
509 ms |
21244 KB |
Output is correct |
31 |
Correct |
806 ms |
20872 KB |
Output is correct |
32 |
Correct |
996 ms |
21600 KB |
Output is correct |
33 |
Correct |
738 ms |
18584 KB |
Output is correct |
34 |
Correct |
894 ms |
22128 KB |
Output is correct |
35 |
Correct |
597 ms |
18676 KB |
Output is correct |
36 |
Correct |
880 ms |
21148 KB |
Output is correct |
37 |
Correct |
788 ms |
20384 KB |
Output is correct |
38 |
Correct |
604 ms |
19712 KB |
Output is correct |
39 |
Correct |
494 ms |
21500 KB |
Output is correct |
40 |
Correct |
307 ms |
20852 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
9708 KB |
Output is correct |
2 |
Correct |
4 ms |
9684 KB |
Output is correct |
3 |
Correct |
4 ms |
9700 KB |
Output is correct |
4 |
Correct |
5 ms |
9632 KB |
Output is correct |
5 |
Correct |
10 ms |
9712 KB |
Output is correct |
6 |
Correct |
7 ms |
9684 KB |
Output is correct |
7 |
Correct |
9 ms |
9684 KB |
Output is correct |
8 |
Correct |
8 ms |
9716 KB |
Output is correct |
9 |
Correct |
7 ms |
9716 KB |
Output is correct |
10 |
Correct |
7 ms |
9684 KB |
Output is correct |
11 |
Correct |
5 ms |
9684 KB |
Output is correct |
12 |
Correct |
7 ms |
9684 KB |
Output is correct |
13 |
Correct |
6 ms |
9712 KB |
Output is correct |
14 |
Correct |
6 ms |
9684 KB |
Output is correct |
15 |
Correct |
8 ms |
9712 KB |
Output is correct |
16 |
Correct |
6 ms |
9712 KB |
Output is correct |
17 |
Correct |
7 ms |
9684 KB |
Output is correct |
18 |
Correct |
6 ms |
9684 KB |
Output is correct |
19 |
Correct |
6 ms |
9684 KB |
Output is correct |
20 |
Correct |
6 ms |
9684 KB |
Output is correct |
21 |
Correct |
4 ms |
9684 KB |
Output is correct |
22 |
Correct |
222 ms |
18332 KB |
Output is correct |
23 |
Correct |
322 ms |
18148 KB |
Output is correct |
24 |
Correct |
229 ms |
18300 KB |
Output is correct |
25 |
Correct |
316 ms |
18124 KB |
Output is correct |
26 |
Correct |
90 ms |
18420 KB |
Output is correct |
27 |
Correct |
195 ms |
16888 KB |
Output is correct |
28 |
Correct |
63 ms |
18372 KB |
Output is correct |
29 |
Correct |
163 ms |
16896 KB |
Output is correct |
30 |
Correct |
165 ms |
17288 KB |
Output is correct |
31 |
Correct |
239 ms |
17080 KB |
Output is correct |
32 |
Correct |
111 ms |
17508 KB |
Output is correct |
33 |
Correct |
98 ms |
17420 KB |
Output is correct |
34 |
Correct |
80 ms |
18872 KB |
Output is correct |
35 |
Correct |
93 ms |
18776 KB |
Output is correct |
36 |
Correct |
248 ms |
18504 KB |
Output is correct |
37 |
Correct |
328 ms |
18176 KB |
Output is correct |
38 |
Correct |
331 ms |
17884 KB |
Output is correct |
39 |
Correct |
238 ms |
18496 KB |
Output is correct |
40 |
Correct |
319 ms |
17880 KB |
Output is correct |
41 |
Correct |
66 ms |
18404 KB |
Output is correct |
42 |
Correct |
67 ms |
18456 KB |
Output is correct |
43 |
Correct |
161 ms |
16928 KB |
Output is correct |
44 |
Correct |
187 ms |
16900 KB |
Output is correct |
45 |
Correct |
184 ms |
17432 KB |
Output is correct |
46 |
Correct |
175 ms |
17316 KB |
Output is correct |
47 |
Correct |
221 ms |
16588 KB |
Output is correct |
48 |
Correct |
86 ms |
17536 KB |
Output is correct |
49 |
Correct |
100 ms |
17524 KB |
Output is correct |
50 |
Correct |
83 ms |
18924 KB |
Output is correct |
51 |
Correct |
109 ms |
18752 KB |
Output is correct |
52 |
Correct |
85 ms |
18988 KB |
Output is correct |
53 |
Correct |
4 ms |
9712 KB |
Output is correct |
54 |
Correct |
728 ms |
19804 KB |
Output is correct |
55 |
Correct |
533 ms |
20204 KB |
Output is correct |
56 |
Correct |
732 ms |
19932 KB |
Output is correct |
57 |
Correct |
746 ms |
19824 KB |
Output is correct |
58 |
Correct |
708 ms |
19868 KB |
Output is correct |
59 |
Correct |
541 ms |
20296 KB |
Output is correct |
60 |
Correct |
692 ms |
19688 KB |
Output is correct |
61 |
Correct |
783 ms |
20160 KB |
Output is correct |
62 |
Correct |
740 ms |
19988 KB |
Output is correct |
63 |
Correct |
783 ms |
20052 KB |
Output is correct |
64 |
Correct |
225 ms |
20300 KB |
Output is correct |
65 |
Correct |
219 ms |
20272 KB |
Output is correct |
66 |
Correct |
230 ms |
20248 KB |
Output is correct |
67 |
Correct |
560 ms |
18504 KB |
Output is correct |
68 |
Correct |
600 ms |
18520 KB |
Output is correct |
69 |
Correct |
817 ms |
18916 KB |
Output is correct |
70 |
Correct |
431 ms |
19004 KB |
Output is correct |
71 |
Correct |
832 ms |
18608 KB |
Output is correct |
72 |
Correct |
596 ms |
18288 KB |
Output is correct |
73 |
Correct |
612 ms |
19120 KB |
Output is correct |
74 |
Correct |
277 ms |
19140 KB |
Output is correct |
75 |
Correct |
271 ms |
19016 KB |
Output is correct |
76 |
Correct |
262 ms |
20820 KB |
Output is correct |
77 |
Correct |
266 ms |
20608 KB |
Output is correct |
78 |
Correct |
5 ms |
9712 KB |
Output is correct |
79 |
Correct |
1597 ms |
19572 KB |
Output is correct |
80 |
Correct |
1105 ms |
22632 KB |
Output is correct |
81 |
Correct |
1364 ms |
19280 KB |
Output is correct |
82 |
Correct |
980 ms |
22360 KB |
Output is correct |
83 |
Correct |
1551 ms |
19736 KB |
Output is correct |
84 |
Correct |
1120 ms |
22504 KB |
Output is correct |
85 |
Correct |
1563 ms |
19476 KB |
Output is correct |
86 |
Correct |
1069 ms |
22448 KB |
Output is correct |
87 |
Correct |
1443 ms |
19252 KB |
Output is correct |
88 |
Correct |
404 ms |
20916 KB |
Output is correct |
89 |
Correct |
502 ms |
21324 KB |
Output is correct |
90 |
Correct |
729 ms |
20496 KB |
Output is correct |
91 |
Correct |
430 ms |
20996 KB |
Output is correct |
92 |
Correct |
509 ms |
21244 KB |
Output is correct |
93 |
Correct |
806 ms |
20872 KB |
Output is correct |
94 |
Correct |
996 ms |
21600 KB |
Output is correct |
95 |
Correct |
738 ms |
18584 KB |
Output is correct |
96 |
Correct |
894 ms |
22128 KB |
Output is correct |
97 |
Correct |
597 ms |
18676 KB |
Output is correct |
98 |
Correct |
880 ms |
21148 KB |
Output is correct |
99 |
Correct |
788 ms |
20384 KB |
Output is correct |
100 |
Correct |
604 ms |
19712 KB |
Output is correct |
101 |
Correct |
494 ms |
21500 KB |
Output is correct |
102 |
Correct |
307 ms |
20852 KB |
Output is correct |
103 |
Correct |
1637 ms |
19020 KB |
Output is correct |
104 |
Correct |
1043 ms |
23284 KB |
Output is correct |
105 |
Correct |
937 ms |
19936 KB |
Output is correct |
106 |
Correct |
766 ms |
20796 KB |
Output is correct |
107 |
Correct |
1652 ms |
19256 KB |
Output is correct |
108 |
Correct |
1197 ms |
23152 KB |
Output is correct |
109 |
Correct |
1112 ms |
19580 KB |
Output is correct |
110 |
Correct |
956 ms |
21500 KB |
Output is correct |
111 |
Correct |
997 ms |
20004 KB |
Output is correct |
112 |
Correct |
805 ms |
20688 KB |
Output is correct |
113 |
Correct |
579 ms |
21152 KB |
Output is correct |
114 |
Correct |
290 ms |
20488 KB |
Output is correct |
115 |
Correct |
941 ms |
20868 KB |
Output is correct |
116 |
Correct |
749 ms |
20224 KB |
Output is correct |
117 |
Correct |
302 ms |
20608 KB |
Output is correct |
118 |
Correct |
607 ms |
19256 KB |
Output is correct |
119 |
Correct |
565 ms |
21296 KB |
Output is correct |
120 |
Correct |
827 ms |
20764 KB |
Output is correct |
121 |
Correct |
658 ms |
19936 KB |
Output is correct |
122 |
Correct |
1196 ms |
21688 KB |
Output is correct |
123 |
Correct |
789 ms |
18212 KB |
Output is correct |
124 |
Correct |
768 ms |
19636 KB |
Output is correct |
125 |
Correct |
666 ms |
18224 KB |
Output is correct |
126 |
Correct |
905 ms |
19196 KB |
Output is correct |
127 |
Correct |
808 ms |
20224 KB |
Output is correct |
128 |
Correct |
452 ms |
19348 KB |
Output is correct |
129 |
Correct |
622 ms |
21532 KB |
Output is correct |
130 |
Correct |
415 ms |
21012 KB |
Output is correct |