# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
569205 |
2022-05-27T03:35:04 Z |
blue |
Fish 2 (JOI22_fish2) |
C++17 |
|
1028 ms |
35728 KB |
#include <iostream>
#include <vector>
#include <algorithm>
#include <cassert>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vpii = vector<pii>;
#define sz(x) int(x.size())
int N;
vll A;
int Q;
struct group
{
int i; //inclusive of the group, not the barrier.
ll Asum;
int winners;
};
struct info
{
int l;
int r;
ll Asum;
int winners;
vector<group> pref;
vector<group> suff;
info()
{
;
}
info(int i)
{
l = r = i;
Asum = A[i];
winners = 1;
}
};
void combine(info& res, const info& X, const info& Y) //!
{
// cerr << "combine called\n";
res.l = X.l;
res.r = Y.r;
res.Asum = X.Asum + Y.Asum;
res.winners = 0;
int Xs = sz(X.suff);
ll Xdp[1 + Xs];
Xdp[0] = A[X.r];
for(int i = 1; i <= Xs; i++)
Xdp[i] = max(Xdp[i-1], A[X.suff[i-1].i - 1] - X.suff[i-1].Asum);
int Ys = sz(Y.pref);
ll Ydp[1 + Ys];
Ydp[0] = A[Y.l];
for(int i = 1; i <= Ys; i++)
Ydp[i] = max(Ydp[i-1], A[Y.pref[i-1].i + 1] - Y.pref[i-1].Asum);
// cerr << "#\n";
int XYreach[1 + Xs];
int XXreach[1 + Xs];
int YXreach[1 + Ys];
int YYreach[1 + Ys];
int xi, yi;
yi = Ys;
for(xi = Xs; xi >= 0; xi--)
{
ll currsum = (xi == Xs ? X.Asum : X.suff[xi].Asum);
while(yi >= 0 && Ydp[yi] > currsum)
yi--;
ll Ygain;
if(yi == Ys)
Ygain = Y.Asum;
else if(yi == -1)
Ygain = 0;
else
Ygain = Y.pref[yi].Asum;
if(xi < Xs && currsum + Ygain >= A[X.suff[xi].i - 1])
{
XXreach[xi] = XXreach[xi+1];
XYreach[xi] = XYreach[xi+1];
}
else
{
XXreach[xi] = xi;
XYreach[xi] = yi;
}
}
// cerr << "#2\n";
xi = Xs;
for(yi = Ys; yi >= 0; yi--)
{
ll currsum = (yi == Ys ? Y.Asum : Y.pref[yi].Asum);
while(xi >= 0 && Xdp[xi] > currsum)
xi--;
ll Xgain;
if(xi == Xs)
Xgain = X.Asum;
else if(xi == -1)
Xgain = 0;
else
Xgain = X.suff[xi].Asum;
if(yi < Ys && currsum + Xgain >= A[Y.pref[yi].i + 1])
{
YYreach[yi] = YYreach[yi+1];
YXreach[yi] = YXreach[yi+1];
}
else
{
YYreach[yi] = yi;
YXreach[yi] = xi;
}
}
// cerr << "#3\n";
res.pref = X.pref;
int pi = sz(res.pref);
if(X.Asum < Ydp[0])
res.pref.push_back({X.r, X.Asum, 0});
for(int i = 0; i < sz(Y.pref); i++)
if(A[Y.pref[i].i + 1] > Y.pref[i].Asum + X.Asum)
res.pref.push_back({Y.pref[i].i, Y.pref[i].Asum + X.Asum, 0});
res.suff = Y.suff;
int si = sz(res.suff);
if(Y.Asum < Xdp[0])
res.suff.push_back({Y.l, Y.Asum, 0});
for(int i = 0; i < sz(X.suff); i++)
if(A[X.suff[i].i - 1] > X.suff[i].Asum + Y.Asum)
res.suff.push_back({X.suff[i].i, X.suff[i].Asum + Y.Asum, 0});
// cerr << "#4\n";
vpii newpref, newsuff;
int pi2 = pi;
int si2 = si;
for(xi = 0; xi <= Xs; xi++)
{
int xiwinners = (xi == Xs ? X.winners : X.suff[xi].winners);
if(XXreach[xi] == Xs && XYreach[xi] == Ys)
res.winners += xiwinners;
else if(XXreach[xi] == Xs)
{
// newpref.push_back({XYreach[xi], xiwinners});
int target = (XYreach[xi] == -1 ? X.r : Y.pref[XYreach[xi]].i);
// // if(XYreach[xi] == -1)
while(res.pref[pi2].i < target)
pi2++;
res.pref[pi2].winners += xiwinners;
}
else if(XYreach[xi] == Ys)
{
// newsuff.push_back({XXreach[xi], xiwinners});
int target = X.suff[XXreach[xi]].i;
while(res.suff[si2].i > target)
si2++;
res.suff[si2].winners += xiwinners;
}
}
pi2 = pi, si2 = si;
// cerr << "#4-1\n";
for(yi = 0; yi <= Ys; yi++)
{
// cerr << "entered : " << yi << '\n';
int yiwinners = (yi == Ys ? Y.winners : Y.pref[yi].winners);
if(YXreach[yi] == Xs && YYreach[yi] == Ys)
res.winners += yiwinners;
else if(YXreach[yi] == Xs)
{
// newpref.push_back({YYreach[yi], yiwinners});
int target = (YYreach[yi] == -1 ? X.r : Y.pref[YYreach[yi]].i);
// // if(XYreach[xi] == -1)
while(res.pref[pi2].i < target)
pi2++;
res.pref[pi2].winners += yiwinners;
}
else if(YYreach[yi] == Ys)
{
// newsuff.push_back({YXreach[yi], yiwinners});
int target = (YXreach[yi] == -1 ? Y.l : X.suff[YXreach[yi]].i);
while(res.suff[si2].i > target)
si2++;
res.suff[si2].winners += yiwinners;
}
}
// cerr << "#5\n";
// for(auto pr : newpref)
// {
// for(auto& respr : res.pref)
// {
// // assert(pr.first < sz(Y.pref));
// if(pr.first == -1 && respr.i == X.r)
// respr.winners += pr.second;
// else if(pr.first != -1 && respr.i == Y.pref[pr.first].i)
// respr.winners += pr.second;
// }
// }
// // cerr << "hello\n";
// for(auto sf : newsuff)
// {
// // cerr << sf.first << ' ' << sf.second << '\n';
// for(auto& ressf : res.suff)
// {
// assert(sf.first < sz(X.suff));
// // cerr << " " << ressf.i << ' ' << ressf.Asum << ' ' << ressf.winners << '\n';
// // cerr << "sff = " << sf.first << '\n';
// // cerr << X.suff[sf.first.i] << '\n';
// if(sf.first == -1 && ressf.i == Y.l)
// {
// // cerr << "bye\n";
// ressf.winners += sf.second;
// // cerr << "bye done\n";
// }
// else if(sf.first != -1 && ressf.i == X.suff[sf.first].i)
// {
// // cerr << "bye2\n";
// ressf.winners += sf.second;
// }
// }
// }
// Y = info(1);
// return res;
// cerr << "combine end\n";
}
info combine(const info& A, const info& B)
{
info res;
combine(res, A, B);
return res;
}
struct segtree
{
info v;
segtree* left = NULL;
segtree* right = NULL;
segtree()
{
;
}
segtree(int L, int R)
{
if(L == R)
v = info(L);
else
{
left = new segtree(L, (L+R)/2);
right = new segtree((L+R)/2+1, R);
combine(v, left->v, right->v);
}
}
void recompute(int I)
{
// cerr << "recompute : " << v.l << ' ' << v.r << ' ' << I << '\n';
if(v.l == v.r)
v = info(v.l);
else
{
if(I <= (v.l+v.r)/2)
left->recompute(I);
else
right->recompute(I);
// cerr << "###\n";
combine(v, left->v, right->v);
// cerr << "combine done\n";
}
// cerr << "done\n";
}
info range(int L, int R)
{
if(L <= v.l && v.r <= R)
return v;
else if(R <= (v.l+v.r)/2)
return left->range(L, R);
else if(L >= (v.l+v.r)/2+1)
return right->range(L, R);
else
return combine(left->range(L, R), right->range(L, R));
}
};
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> N;
A = vll(1+N);
for(int i = 1; i <= N; i++)
cin >> A[i];
// cerr << "done\n";
segtree S(1, N);
// cerr << "done2\n";
cin >> Q;
for(int j = 1; j <= Q; j++)
{
int T;
cin >> T;
if(T == 1)
{
int X, Y;
cin >> X >> Y;
A[X] = Y;
S.recompute(X);
// cerr << "hello\n";
}
else
{
int L, R;
cin >> L >> R;
cout << S.range(L, R).winners << '\n';
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
2 ms |
468 KB |
Output is correct |
6 |
Correct |
2 ms |
468 KB |
Output is correct |
7 |
Correct |
2 ms |
468 KB |
Output is correct |
8 |
Correct |
2 ms |
468 KB |
Output is correct |
9 |
Correct |
2 ms |
468 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
2 ms |
432 KB |
Output is correct |
12 |
Correct |
2 ms |
340 KB |
Output is correct |
13 |
Correct |
2 ms |
340 KB |
Output is correct |
14 |
Correct |
2 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
468 KB |
Output is correct |
16 |
Correct |
2 ms |
468 KB |
Output is correct |
17 |
Correct |
2 ms |
340 KB |
Output is correct |
18 |
Correct |
2 ms |
340 KB |
Output is correct |
19 |
Correct |
2 ms |
340 KB |
Output is correct |
20 |
Correct |
2 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
47 ms |
32464 KB |
Output is correct |
3 |
Correct |
46 ms |
29876 KB |
Output is correct |
4 |
Correct |
42 ms |
32328 KB |
Output is correct |
5 |
Correct |
40 ms |
30036 KB |
Output is correct |
6 |
Correct |
42 ms |
23696 KB |
Output is correct |
7 |
Correct |
36 ms |
23764 KB |
Output is correct |
8 |
Correct |
41 ms |
23756 KB |
Output is correct |
9 |
Correct |
35 ms |
23880 KB |
Output is correct |
10 |
Correct |
45 ms |
32668 KB |
Output is correct |
11 |
Correct |
41 ms |
27868 KB |
Output is correct |
12 |
Correct |
41 ms |
23512 KB |
Output is correct |
13 |
Correct |
34 ms |
23476 KB |
Output is correct |
14 |
Correct |
42 ms |
24868 KB |
Output is correct |
15 |
Correct |
48 ms |
25208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
2 ms |
468 KB |
Output is correct |
6 |
Correct |
2 ms |
468 KB |
Output is correct |
7 |
Correct |
2 ms |
468 KB |
Output is correct |
8 |
Correct |
2 ms |
468 KB |
Output is correct |
9 |
Correct |
2 ms |
468 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
2 ms |
432 KB |
Output is correct |
12 |
Correct |
2 ms |
340 KB |
Output is correct |
13 |
Correct |
2 ms |
340 KB |
Output is correct |
14 |
Correct |
2 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
468 KB |
Output is correct |
16 |
Correct |
2 ms |
468 KB |
Output is correct |
17 |
Correct |
2 ms |
340 KB |
Output is correct |
18 |
Correct |
2 ms |
340 KB |
Output is correct |
19 |
Correct |
2 ms |
340 KB |
Output is correct |
20 |
Correct |
2 ms |
340 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
47 ms |
32464 KB |
Output is correct |
23 |
Correct |
46 ms |
29876 KB |
Output is correct |
24 |
Correct |
42 ms |
32328 KB |
Output is correct |
25 |
Correct |
40 ms |
30036 KB |
Output is correct |
26 |
Correct |
42 ms |
23696 KB |
Output is correct |
27 |
Correct |
36 ms |
23764 KB |
Output is correct |
28 |
Correct |
41 ms |
23756 KB |
Output is correct |
29 |
Correct |
35 ms |
23880 KB |
Output is correct |
30 |
Correct |
45 ms |
32668 KB |
Output is correct |
31 |
Correct |
41 ms |
27868 KB |
Output is correct |
32 |
Correct |
41 ms |
23512 KB |
Output is correct |
33 |
Correct |
34 ms |
23476 KB |
Output is correct |
34 |
Correct |
42 ms |
24868 KB |
Output is correct |
35 |
Correct |
48 ms |
25208 KB |
Output is correct |
36 |
Correct |
49 ms |
32624 KB |
Output is correct |
37 |
Correct |
50 ms |
29968 KB |
Output is correct |
38 |
Correct |
52 ms |
29932 KB |
Output is correct |
39 |
Correct |
52 ms |
32576 KB |
Output is correct |
40 |
Correct |
64 ms |
29880 KB |
Output is correct |
41 |
Correct |
48 ms |
23760 KB |
Output is correct |
42 |
Correct |
52 ms |
23888 KB |
Output is correct |
43 |
Correct |
41 ms |
24020 KB |
Output is correct |
44 |
Correct |
44 ms |
23924 KB |
Output is correct |
45 |
Correct |
55 ms |
32588 KB |
Output is correct |
46 |
Correct |
54 ms |
32764 KB |
Output is correct |
47 |
Correct |
50 ms |
26984 KB |
Output is correct |
48 |
Correct |
38 ms |
23612 KB |
Output is correct |
49 |
Correct |
37 ms |
23444 KB |
Output is correct |
50 |
Correct |
42 ms |
24908 KB |
Output is correct |
51 |
Correct |
44 ms |
25160 KB |
Output is correct |
52 |
Correct |
44 ms |
24964 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
47 ms |
32464 KB |
Output is correct |
3 |
Correct |
46 ms |
29876 KB |
Output is correct |
4 |
Correct |
42 ms |
32328 KB |
Output is correct |
5 |
Correct |
40 ms |
30036 KB |
Output is correct |
6 |
Correct |
42 ms |
23696 KB |
Output is correct |
7 |
Correct |
36 ms |
23764 KB |
Output is correct |
8 |
Correct |
41 ms |
23756 KB |
Output is correct |
9 |
Correct |
35 ms |
23880 KB |
Output is correct |
10 |
Correct |
45 ms |
32668 KB |
Output is correct |
11 |
Correct |
41 ms |
27868 KB |
Output is correct |
12 |
Correct |
41 ms |
23512 KB |
Output is correct |
13 |
Correct |
34 ms |
23476 KB |
Output is correct |
14 |
Correct |
42 ms |
24868 KB |
Output is correct |
15 |
Correct |
48 ms |
25208 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
988 ms |
30416 KB |
Output is correct |
18 |
Correct |
862 ms |
33096 KB |
Output is correct |
19 |
Correct |
991 ms |
30472 KB |
Output is correct |
20 |
Correct |
1028 ms |
30068 KB |
Output is correct |
21 |
Correct |
1020 ms |
30384 KB |
Output is correct |
22 |
Correct |
786 ms |
33032 KB |
Output is correct |
23 |
Correct |
909 ms |
30080 KB |
Output is correct |
24 |
Correct |
968 ms |
30364 KB |
Output is correct |
25 |
Correct |
988 ms |
30372 KB |
Output is correct |
26 |
Correct |
938 ms |
30564 KB |
Output is correct |
27 |
Correct |
523 ms |
24428 KB |
Output is correct |
28 |
Correct |
504 ms |
24356 KB |
Output is correct |
29 |
Correct |
483 ms |
24472 KB |
Output is correct |
30 |
Correct |
697 ms |
24200 KB |
Output is correct |
31 |
Correct |
652 ms |
24036 KB |
Output is correct |
32 |
Correct |
972 ms |
28112 KB |
Output is correct |
33 |
Correct |
980 ms |
33492 KB |
Output is correct |
34 |
Correct |
886 ms |
27836 KB |
Output is correct |
35 |
Correct |
924 ms |
26872 KB |
Output is correct |
36 |
Correct |
921 ms |
33212 KB |
Output is correct |
37 |
Correct |
444 ms |
23900 KB |
Output is correct |
38 |
Correct |
502 ms |
23720 KB |
Output is correct |
39 |
Correct |
561 ms |
25628 KB |
Output is correct |
40 |
Correct |
593 ms |
25792 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
47 ms |
32464 KB |
Output is correct |
3 |
Correct |
46 ms |
29876 KB |
Output is correct |
4 |
Correct |
42 ms |
32328 KB |
Output is correct |
5 |
Correct |
40 ms |
30036 KB |
Output is correct |
6 |
Correct |
42 ms |
23696 KB |
Output is correct |
7 |
Correct |
36 ms |
23764 KB |
Output is correct |
8 |
Correct |
41 ms |
23756 KB |
Output is correct |
9 |
Correct |
35 ms |
23880 KB |
Output is correct |
10 |
Correct |
45 ms |
32668 KB |
Output is correct |
11 |
Correct |
41 ms |
27868 KB |
Output is correct |
12 |
Correct |
41 ms |
23512 KB |
Output is correct |
13 |
Correct |
34 ms |
23476 KB |
Output is correct |
14 |
Correct |
42 ms |
24868 KB |
Output is correct |
15 |
Correct |
48 ms |
25208 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
582 ms |
33504 KB |
Output is correct |
18 |
Correct |
520 ms |
33940 KB |
Output is correct |
19 |
Correct |
396 ms |
30284 KB |
Output is correct |
20 |
Correct |
345 ms |
33556 KB |
Output is correct |
21 |
Correct |
510 ms |
33684 KB |
Output is correct |
22 |
Correct |
496 ms |
33840 KB |
Output is correct |
23 |
Correct |
520 ms |
30212 KB |
Output is correct |
24 |
Correct |
469 ms |
33896 KB |
Output is correct |
25 |
Correct |
480 ms |
30296 KB |
Output is correct |
26 |
Correct |
283 ms |
25428 KB |
Output is correct |
27 |
Correct |
300 ms |
25988 KB |
Output is correct |
28 |
Correct |
333 ms |
28360 KB |
Output is correct |
29 |
Correct |
252 ms |
25616 KB |
Output is correct |
30 |
Correct |
330 ms |
25656 KB |
Output is correct |
31 |
Correct |
381 ms |
28656 KB |
Output is correct |
32 |
Correct |
482 ms |
32236 KB |
Output is correct |
33 |
Correct |
447 ms |
27800 KB |
Output is correct |
34 |
Correct |
476 ms |
35312 KB |
Output is correct |
35 |
Correct |
389 ms |
32968 KB |
Output is correct |
36 |
Correct |
395 ms |
31468 KB |
Output is correct |
37 |
Correct |
353 ms |
27488 KB |
Output is correct |
38 |
Correct |
255 ms |
26704 KB |
Output is correct |
39 |
Correct |
277 ms |
27164 KB |
Output is correct |
40 |
Correct |
134 ms |
26588 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
2 ms |
468 KB |
Output is correct |
6 |
Correct |
2 ms |
468 KB |
Output is correct |
7 |
Correct |
2 ms |
468 KB |
Output is correct |
8 |
Correct |
2 ms |
468 KB |
Output is correct |
9 |
Correct |
2 ms |
468 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
2 ms |
432 KB |
Output is correct |
12 |
Correct |
2 ms |
340 KB |
Output is correct |
13 |
Correct |
2 ms |
340 KB |
Output is correct |
14 |
Correct |
2 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
468 KB |
Output is correct |
16 |
Correct |
2 ms |
468 KB |
Output is correct |
17 |
Correct |
2 ms |
340 KB |
Output is correct |
18 |
Correct |
2 ms |
340 KB |
Output is correct |
19 |
Correct |
2 ms |
340 KB |
Output is correct |
20 |
Correct |
2 ms |
340 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
47 ms |
32464 KB |
Output is correct |
23 |
Correct |
46 ms |
29876 KB |
Output is correct |
24 |
Correct |
42 ms |
32328 KB |
Output is correct |
25 |
Correct |
40 ms |
30036 KB |
Output is correct |
26 |
Correct |
42 ms |
23696 KB |
Output is correct |
27 |
Correct |
36 ms |
23764 KB |
Output is correct |
28 |
Correct |
41 ms |
23756 KB |
Output is correct |
29 |
Correct |
35 ms |
23880 KB |
Output is correct |
30 |
Correct |
45 ms |
32668 KB |
Output is correct |
31 |
Correct |
41 ms |
27868 KB |
Output is correct |
32 |
Correct |
41 ms |
23512 KB |
Output is correct |
33 |
Correct |
34 ms |
23476 KB |
Output is correct |
34 |
Correct |
42 ms |
24868 KB |
Output is correct |
35 |
Correct |
48 ms |
25208 KB |
Output is correct |
36 |
Correct |
49 ms |
32624 KB |
Output is correct |
37 |
Correct |
50 ms |
29968 KB |
Output is correct |
38 |
Correct |
52 ms |
29932 KB |
Output is correct |
39 |
Correct |
52 ms |
32576 KB |
Output is correct |
40 |
Correct |
64 ms |
29880 KB |
Output is correct |
41 |
Correct |
48 ms |
23760 KB |
Output is correct |
42 |
Correct |
52 ms |
23888 KB |
Output is correct |
43 |
Correct |
41 ms |
24020 KB |
Output is correct |
44 |
Correct |
44 ms |
23924 KB |
Output is correct |
45 |
Correct |
55 ms |
32588 KB |
Output is correct |
46 |
Correct |
54 ms |
32764 KB |
Output is correct |
47 |
Correct |
50 ms |
26984 KB |
Output is correct |
48 |
Correct |
38 ms |
23612 KB |
Output is correct |
49 |
Correct |
37 ms |
23444 KB |
Output is correct |
50 |
Correct |
42 ms |
24908 KB |
Output is correct |
51 |
Correct |
44 ms |
25160 KB |
Output is correct |
52 |
Correct |
44 ms |
24964 KB |
Output is correct |
53 |
Correct |
0 ms |
212 KB |
Output is correct |
54 |
Correct |
988 ms |
30416 KB |
Output is correct |
55 |
Correct |
862 ms |
33096 KB |
Output is correct |
56 |
Correct |
991 ms |
30472 KB |
Output is correct |
57 |
Correct |
1028 ms |
30068 KB |
Output is correct |
58 |
Correct |
1020 ms |
30384 KB |
Output is correct |
59 |
Correct |
786 ms |
33032 KB |
Output is correct |
60 |
Correct |
909 ms |
30080 KB |
Output is correct |
61 |
Correct |
968 ms |
30364 KB |
Output is correct |
62 |
Correct |
988 ms |
30372 KB |
Output is correct |
63 |
Correct |
938 ms |
30564 KB |
Output is correct |
64 |
Correct |
523 ms |
24428 KB |
Output is correct |
65 |
Correct |
504 ms |
24356 KB |
Output is correct |
66 |
Correct |
483 ms |
24472 KB |
Output is correct |
67 |
Correct |
697 ms |
24200 KB |
Output is correct |
68 |
Correct |
652 ms |
24036 KB |
Output is correct |
69 |
Correct |
972 ms |
28112 KB |
Output is correct |
70 |
Correct |
980 ms |
33492 KB |
Output is correct |
71 |
Correct |
886 ms |
27836 KB |
Output is correct |
72 |
Correct |
924 ms |
26872 KB |
Output is correct |
73 |
Correct |
921 ms |
33212 KB |
Output is correct |
74 |
Correct |
444 ms |
23900 KB |
Output is correct |
75 |
Correct |
502 ms |
23720 KB |
Output is correct |
76 |
Correct |
561 ms |
25628 KB |
Output is correct |
77 |
Correct |
593 ms |
25792 KB |
Output is correct |
78 |
Correct |
0 ms |
212 KB |
Output is correct |
79 |
Correct |
582 ms |
33504 KB |
Output is correct |
80 |
Correct |
520 ms |
33940 KB |
Output is correct |
81 |
Correct |
396 ms |
30284 KB |
Output is correct |
82 |
Correct |
345 ms |
33556 KB |
Output is correct |
83 |
Correct |
510 ms |
33684 KB |
Output is correct |
84 |
Correct |
496 ms |
33840 KB |
Output is correct |
85 |
Correct |
520 ms |
30212 KB |
Output is correct |
86 |
Correct |
469 ms |
33896 KB |
Output is correct |
87 |
Correct |
480 ms |
30296 KB |
Output is correct |
88 |
Correct |
283 ms |
25428 KB |
Output is correct |
89 |
Correct |
300 ms |
25988 KB |
Output is correct |
90 |
Correct |
333 ms |
28360 KB |
Output is correct |
91 |
Correct |
252 ms |
25616 KB |
Output is correct |
92 |
Correct |
330 ms |
25656 KB |
Output is correct |
93 |
Correct |
381 ms |
28656 KB |
Output is correct |
94 |
Correct |
482 ms |
32236 KB |
Output is correct |
95 |
Correct |
447 ms |
27800 KB |
Output is correct |
96 |
Correct |
476 ms |
35312 KB |
Output is correct |
97 |
Correct |
389 ms |
32968 KB |
Output is correct |
98 |
Correct |
395 ms |
31468 KB |
Output is correct |
99 |
Correct |
353 ms |
27488 KB |
Output is correct |
100 |
Correct |
255 ms |
26704 KB |
Output is correct |
101 |
Correct |
277 ms |
27164 KB |
Output is correct |
102 |
Correct |
134 ms |
26588 KB |
Output is correct |
103 |
Correct |
720 ms |
30516 KB |
Output is correct |
104 |
Correct |
510 ms |
35656 KB |
Output is correct |
105 |
Correct |
955 ms |
30632 KB |
Output is correct |
106 |
Correct |
751 ms |
32008 KB |
Output is correct |
107 |
Correct |
741 ms |
30540 KB |
Output is correct |
108 |
Correct |
553 ms |
35728 KB |
Output is correct |
109 |
Correct |
827 ms |
30576 KB |
Output is correct |
110 |
Correct |
797 ms |
32720 KB |
Output is correct |
111 |
Correct |
928 ms |
30712 KB |
Output is correct |
112 |
Correct |
853 ms |
31804 KB |
Output is correct |
113 |
Correct |
436 ms |
25492 KB |
Output is correct |
114 |
Correct |
492 ms |
24484 KB |
Output is correct |
115 |
Correct |
504 ms |
28620 KB |
Output is correct |
116 |
Correct |
629 ms |
27704 KB |
Output is correct |
117 |
Correct |
463 ms |
24696 KB |
Output is correct |
118 |
Correct |
692 ms |
26092 KB |
Output is correct |
119 |
Correct |
375 ms |
25776 KB |
Output is correct |
120 |
Correct |
554 ms |
28540 KB |
Output is correct |
121 |
Correct |
679 ms |
27476 KB |
Output is correct |
122 |
Correct |
515 ms |
32280 KB |
Output is correct |
123 |
Correct |
797 ms |
28080 KB |
Output is correct |
124 |
Correct |
760 ms |
29256 KB |
Output is correct |
125 |
Correct |
925 ms |
26548 KB |
Output is correct |
126 |
Correct |
887 ms |
28736 KB |
Output is correct |
127 |
Correct |
547 ms |
27568 KB |
Output is correct |
128 |
Correct |
531 ms |
25196 KB |
Output is correct |
129 |
Correct |
574 ms |
27072 KB |
Output is correct |
130 |
Correct |
536 ms |
26616 KB |
Output is correct |