#include <bits/stdc++.h>
#define eb emplace_back
#define sz(V) ((int)(V).size())
#define allv(V) ((V).begin()),((V).end())
#define sorv(V) sort(allv(V))
#define rb(x) ((x)&(-(x)))
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int MAXN = 1000055;
const int MAXM = 1000055;
struct BIT {
ll d[MAXN];
void upd(int x, ll r) {
for(x += 5; x < MAXN; x += rb(x))
d[x] += r;
}
ll get(int x) {
ll r = 0; for(x += 5; x; x -= rb(x))
r += d[x];
return r;
}
ll get(int s, int e) { return s > e ? 0 : get(e) - get(s-1); }
} bit;
struct NOD {
NOD(int i, int s, int e) : i(i), s(s), e(e) {}
int i, s, e;
};
struct SEG {
ll ds[MAXN*3];
bitset<MAXN*3> dz;
void prop(int i, int s, int e) {
if(dz[i]) {
ds[i] = 0;
if(s != e) dz[i<<1] = dz[i<<1|1] = true;
dz[i] = false;
return;
}
if(s == e) return;
ds[i] = 0;
if(!dz[i<<1]) ds[i] += ds[i<<1];
if(!dz[i<<1|1]) ds[i] += ds[i<<1|1];
}
void cal(int i) { ds[i] = ds[i<<1] + ds[i<<1|1]; }
void updz(int i, int s, int e, int p, int q) {
prop(i, s, e); if(q < p || e < p || q < s) return;
if(p <= s && e <= q) {
dz[i] = true;
prop(i, s, e);
return;
}
int m = (s+e) >> 1;
updz(i<<1, s, m, p, q);
updz(i<<1|1, m+1, e, p, q);
cal(i);
}
void updp(int i, int s, int e, int x, ll r) {
prop(i, s, e); if(x < s || e < x) return;
if(s == e) {
ds[i] = r;
return;
}
int m = (s+e) >> 1;
updp(i<<1, s, m, x, r);
updp(i<<1|1, m+1, e, x, r);
ds[i] = ds[i<<1] + ds[i<<1|1];
}
void upddx(int i, int s, int e, int x, ll r) {
prop(i, s, e); if(x < s || e < x) return;
if(s == e) {
ds[i] += r;
return;
}
int m = (s+e) >> 1;
upddx(i<<1, s, m, x, r);
upddx(i<<1|1, m+1, e, x, r);
cal(i);
}
ll get(int i, int s, int e, int p, int q) {
prop(i, s, e); if(q < p || e < p || q < s) return 0;
if(p <= s && e <= q) return ds[i];
int m = (s+e) >> 1;
ll ret = get(i<<1, s, m, p, q) + get(i<<1|1, m+1, e, p, q);
cal(i);
return ret;
}
ll get(int i, int s, int e, int x) { return get(1, s, e, x, x); }
void getNodes(vector<NOD> &V, int i, int s, int e, int p, int q) {
prop(i, s, e); if(q < p || e < p || q < s) return;
if(p <= s && e <= q) {
V.eb(i, s, e);
return;
}
int m = (s+e) >> 1;
getNodes(V, i<<1, s, m, p, q);
getNodes(V, i<<1|1, m+1, e, p, q);
}
int getX(int i, int s, int e, ll lft) {
prop(i, s, e); if(s == e) return s;
int m = (s+e) >> 1;
int ret;
if(lft < ds[i<<1]) {
ret = getX(i<<1, s, m, lft);
prop(i<<1|1, m+1, e);
} else {
prop(i<<1, s, m);
ret = getX(i<<1|1, m+1, e, lft - ds[i<<1]);
}
cal(i);
return ret;
}
} seg;
vector<pii> PopEV[MAXM];
vector<pii> PushEV[MAXM];
ll SA[MAXN], SB[MAXM];
int FI[MAXN], GI[MAXM];
ll C[MAXN], D[MAXM];
int A[MAXN], B[MAXM];
int E[MAXN], F[MAXM];
ll Delta;
int N, M;
int fndX(int s, ll K) {
vector<NOD> V;
seg.getNodes(V, 1, 1, N, s, N);
ll sum = 0;
for(auto &v : V) {
ll t = seg.ds[v.i];
if(K <= sum+t) return seg.getX(v.i, v.s, v.e, K-sum);
sum += t;
}
return N+1;
}
int main() {
ios::sync_with_stdio(false);
cin >> N >> M;
for(int i = 1; i <= N; i++)
cin >> A[i] >> C[i] >> E[i];
for(int i = 1; i <= M; i++)
cin >> B[i] >> D[i] >> F[i];
for(int i = 1; i <= N; i++) SA[i] = SA[i-1] + A[i];
for(int i = 1; i <= M; i++) SB[i] = SB[i-1] + B[i];
for(int i = 1; i <= N; i++)
FI[i] = int(upper_bound(SB, SB+M+1, C[i]-SA[i])-SB) - 1;
for(int i = 1; i <= M; i++)
GI[i] = int(upper_bound(SA, SA+N+1, D[i]-SB[i])-SA) - 1;
for(int i = 1; i <= N; i++) if(0 <= FI[i] && E[i]) {
if(0 < E[i]) {
PopEV[FI[i]+1].eb(i, E[i]);
bit.upd(i, E[i]);
} else {
Delta += E[i];
if(FI[i] < M) PushEV[FI[i]+1].eb(i-1, -E[i]);
}
}
for(int i = 1; i <= M; i++) if(0 <= GI[i] && F[i]) {
if(0 < F[i]) PushEV[i].eb(GI[i], F[i]);
else {
Delta += F[i];
if(GI[i] < N) {
PopEV[i].eb(GI[i]+1, -F[i]);
bit.upd(GI[i]+1, -F[i]);
}
}
}
for(int j = 1; j <= M; j++) {
for(auto &ev : PopEV[j]) {
int i, ei; tie(i, ei) = ev;
bit.upd(i, -ei);
seg.upddx(1, 1, N, i, ei);
}
for(auto &ev : PushEV[j]) {
int i, ei; tie(i, ei) = ev;
Delta += ei;
int s = fndX(i+1, ei);
ll t = seg.get(1, 1, N, i+1, s-1);
seg.updz(1, 1, N, i+1, s-1);
if(s <= N) seg.upddx(1, 1, N, s, t-ei);
}
}
cout << bit.get(1, N) + seg.get(1, 1, N, 1, N) + Delta << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
679 ms |
77340 KB |
Output is correct |
2 |
Correct |
622 ms |
77744 KB |
Output is correct |
3 |
Correct |
298 ms |
71912 KB |
Output is correct |
4 |
Correct |
553 ms |
73464 KB |
Output is correct |
5 |
Correct |
44 ms |
47736 KB |
Output is correct |
6 |
Correct |
626 ms |
76148 KB |
Output is correct |
7 |
Correct |
166 ms |
62712 KB |
Output is correct |
8 |
Correct |
164 ms |
60392 KB |
Output is correct |
9 |
Correct |
303 ms |
71932 KB |
Output is correct |
10 |
Correct |
695 ms |
80760 KB |
Output is correct |
11 |
Correct |
231 ms |
72040 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
47740 KB |
Output is correct |
2 |
Correct |
44 ms |
47736 KB |
Output is correct |
3 |
Correct |
44 ms |
47740 KB |
Output is correct |
4 |
Correct |
48 ms |
47864 KB |
Output is correct |
5 |
Correct |
45 ms |
47864 KB |
Output is correct |
6 |
Correct |
45 ms |
47892 KB |
Output is correct |
7 |
Correct |
44 ms |
47864 KB |
Output is correct |
8 |
Correct |
45 ms |
47864 KB |
Output is correct |
9 |
Correct |
44 ms |
47864 KB |
Output is correct |
10 |
Correct |
44 ms |
47864 KB |
Output is correct |
11 |
Correct |
44 ms |
47864 KB |
Output is correct |
12 |
Correct |
45 ms |
47736 KB |
Output is correct |
13 |
Correct |
45 ms |
47864 KB |
Output is correct |
14 |
Correct |
44 ms |
47864 KB |
Output is correct |
15 |
Correct |
53 ms |
47864 KB |
Output is correct |
16 |
Correct |
45 ms |
47740 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
47740 KB |
Output is correct |
2 |
Correct |
44 ms |
47736 KB |
Output is correct |
3 |
Correct |
44 ms |
47740 KB |
Output is correct |
4 |
Correct |
48 ms |
47864 KB |
Output is correct |
5 |
Correct |
45 ms |
47864 KB |
Output is correct |
6 |
Correct |
45 ms |
47892 KB |
Output is correct |
7 |
Correct |
44 ms |
47864 KB |
Output is correct |
8 |
Correct |
45 ms |
47864 KB |
Output is correct |
9 |
Correct |
44 ms |
47864 KB |
Output is correct |
10 |
Correct |
44 ms |
47864 KB |
Output is correct |
11 |
Correct |
44 ms |
47864 KB |
Output is correct |
12 |
Correct |
45 ms |
47736 KB |
Output is correct |
13 |
Correct |
45 ms |
47864 KB |
Output is correct |
14 |
Correct |
44 ms |
47864 KB |
Output is correct |
15 |
Correct |
53 ms |
47864 KB |
Output is correct |
16 |
Correct |
45 ms |
47740 KB |
Output is correct |
17 |
Correct |
48 ms |
48196 KB |
Output is correct |
18 |
Correct |
47 ms |
48120 KB |
Output is correct |
19 |
Correct |
52 ms |
48120 KB |
Output is correct |
20 |
Correct |
51 ms |
48120 KB |
Output is correct |
21 |
Correct |
51 ms |
48120 KB |
Output is correct |
22 |
Correct |
52 ms |
48120 KB |
Output is correct |
23 |
Correct |
51 ms |
48248 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
47740 KB |
Output is correct |
2 |
Correct |
44 ms |
47736 KB |
Output is correct |
3 |
Correct |
44 ms |
47740 KB |
Output is correct |
4 |
Correct |
48 ms |
47864 KB |
Output is correct |
5 |
Correct |
45 ms |
47864 KB |
Output is correct |
6 |
Correct |
45 ms |
47892 KB |
Output is correct |
7 |
Correct |
44 ms |
47864 KB |
Output is correct |
8 |
Correct |
45 ms |
47864 KB |
Output is correct |
9 |
Correct |
44 ms |
47864 KB |
Output is correct |
10 |
Correct |
44 ms |
47864 KB |
Output is correct |
11 |
Correct |
44 ms |
47864 KB |
Output is correct |
12 |
Correct |
45 ms |
47736 KB |
Output is correct |
13 |
Correct |
45 ms |
47864 KB |
Output is correct |
14 |
Correct |
44 ms |
47864 KB |
Output is correct |
15 |
Correct |
53 ms |
47864 KB |
Output is correct |
16 |
Correct |
45 ms |
47740 KB |
Output is correct |
17 |
Correct |
48 ms |
48196 KB |
Output is correct |
18 |
Correct |
47 ms |
48120 KB |
Output is correct |
19 |
Correct |
52 ms |
48120 KB |
Output is correct |
20 |
Correct |
51 ms |
48120 KB |
Output is correct |
21 |
Correct |
51 ms |
48120 KB |
Output is correct |
22 |
Correct |
52 ms |
48120 KB |
Output is correct |
23 |
Correct |
51 ms |
48248 KB |
Output is correct |
24 |
Correct |
332 ms |
72868 KB |
Output is correct |
25 |
Correct |
269 ms |
71180 KB |
Output is correct |
26 |
Correct |
354 ms |
77560 KB |
Output is correct |
27 |
Correct |
606 ms |
75376 KB |
Output is correct |
28 |
Correct |
520 ms |
76048 KB |
Output is correct |
29 |
Correct |
271 ms |
71868 KB |
Output is correct |
30 |
Correct |
1217 ms |
78624 KB |
Output is correct |
31 |
Correct |
160 ms |
63320 KB |
Output is correct |
32 |
Correct |
195 ms |
64536 KB |
Output is correct |
33 |
Correct |
724 ms |
73848 KB |
Output is correct |
34 |
Correct |
879 ms |
77188 KB |
Output is correct |
35 |
Correct |
1128 ms |
78256 KB |
Output is correct |
36 |
Correct |
1133 ms |
78200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
47740 KB |
Output is correct |
2 |
Correct |
44 ms |
47736 KB |
Output is correct |
3 |
Correct |
44 ms |
47740 KB |
Output is correct |
4 |
Correct |
48 ms |
47864 KB |
Output is correct |
5 |
Correct |
45 ms |
47864 KB |
Output is correct |
6 |
Correct |
45 ms |
47892 KB |
Output is correct |
7 |
Correct |
44 ms |
47864 KB |
Output is correct |
8 |
Correct |
45 ms |
47864 KB |
Output is correct |
9 |
Correct |
44 ms |
47864 KB |
Output is correct |
10 |
Correct |
44 ms |
47864 KB |
Output is correct |
11 |
Correct |
44 ms |
47864 KB |
Output is correct |
12 |
Correct |
45 ms |
47736 KB |
Output is correct |
13 |
Correct |
45 ms |
47864 KB |
Output is correct |
14 |
Correct |
44 ms |
47864 KB |
Output is correct |
15 |
Correct |
53 ms |
47864 KB |
Output is correct |
16 |
Correct |
45 ms |
47740 KB |
Output is correct |
17 |
Correct |
48 ms |
48196 KB |
Output is correct |
18 |
Correct |
47 ms |
48120 KB |
Output is correct |
19 |
Correct |
52 ms |
48120 KB |
Output is correct |
20 |
Correct |
51 ms |
48120 KB |
Output is correct |
21 |
Correct |
51 ms |
48120 KB |
Output is correct |
22 |
Correct |
52 ms |
48120 KB |
Output is correct |
23 |
Correct |
51 ms |
48248 KB |
Output is correct |
24 |
Correct |
332 ms |
72868 KB |
Output is correct |
25 |
Correct |
269 ms |
71180 KB |
Output is correct |
26 |
Correct |
354 ms |
77560 KB |
Output is correct |
27 |
Correct |
606 ms |
75376 KB |
Output is correct |
28 |
Correct |
520 ms |
76048 KB |
Output is correct |
29 |
Correct |
271 ms |
71868 KB |
Output is correct |
30 |
Correct |
1217 ms |
78624 KB |
Output is correct |
31 |
Correct |
160 ms |
63320 KB |
Output is correct |
32 |
Correct |
195 ms |
64536 KB |
Output is correct |
33 |
Correct |
724 ms |
73848 KB |
Output is correct |
34 |
Correct |
879 ms |
77188 KB |
Output is correct |
35 |
Correct |
1128 ms |
78256 KB |
Output is correct |
36 |
Correct |
1133 ms |
78200 KB |
Output is correct |
37 |
Correct |
384 ms |
77572 KB |
Output is correct |
38 |
Correct |
617 ms |
75248 KB |
Output is correct |
39 |
Correct |
958 ms |
80728 KB |
Output is correct |
40 |
Correct |
596 ms |
80712 KB |
Output is correct |
41 |
Correct |
44 ms |
47864 KB |
Output is correct |
42 |
Correct |
1279 ms |
78904 KB |
Output is correct |
43 |
Correct |
765 ms |
74196 KB |
Output is correct |
44 |
Correct |
957 ms |
77680 KB |
Output is correct |
45 |
Correct |
1177 ms |
78456 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
47740 KB |
Output is correct |
2 |
Correct |
44 ms |
47736 KB |
Output is correct |
3 |
Correct |
44 ms |
47740 KB |
Output is correct |
4 |
Correct |
48 ms |
47864 KB |
Output is correct |
5 |
Correct |
45 ms |
47864 KB |
Output is correct |
6 |
Correct |
45 ms |
47892 KB |
Output is correct |
7 |
Correct |
44 ms |
47864 KB |
Output is correct |
8 |
Correct |
45 ms |
47864 KB |
Output is correct |
9 |
Correct |
44 ms |
47864 KB |
Output is correct |
10 |
Correct |
44 ms |
47864 KB |
Output is correct |
11 |
Correct |
44 ms |
47864 KB |
Output is correct |
12 |
Correct |
45 ms |
47736 KB |
Output is correct |
13 |
Correct |
45 ms |
47864 KB |
Output is correct |
14 |
Correct |
44 ms |
47864 KB |
Output is correct |
15 |
Correct |
53 ms |
47864 KB |
Output is correct |
16 |
Correct |
45 ms |
47740 KB |
Output is correct |
17 |
Correct |
48 ms |
48196 KB |
Output is correct |
18 |
Correct |
47 ms |
48120 KB |
Output is correct |
19 |
Correct |
52 ms |
48120 KB |
Output is correct |
20 |
Correct |
51 ms |
48120 KB |
Output is correct |
21 |
Correct |
51 ms |
48120 KB |
Output is correct |
22 |
Correct |
52 ms |
48120 KB |
Output is correct |
23 |
Correct |
51 ms |
48248 KB |
Output is correct |
24 |
Correct |
332 ms |
72868 KB |
Output is correct |
25 |
Correct |
269 ms |
71180 KB |
Output is correct |
26 |
Correct |
354 ms |
77560 KB |
Output is correct |
27 |
Correct |
606 ms |
75376 KB |
Output is correct |
28 |
Correct |
520 ms |
76048 KB |
Output is correct |
29 |
Correct |
271 ms |
71868 KB |
Output is correct |
30 |
Correct |
1217 ms |
78624 KB |
Output is correct |
31 |
Correct |
160 ms |
63320 KB |
Output is correct |
32 |
Correct |
195 ms |
64536 KB |
Output is correct |
33 |
Correct |
724 ms |
73848 KB |
Output is correct |
34 |
Correct |
879 ms |
77188 KB |
Output is correct |
35 |
Correct |
1128 ms |
78256 KB |
Output is correct |
36 |
Correct |
1133 ms |
78200 KB |
Output is correct |
37 |
Correct |
384 ms |
77572 KB |
Output is correct |
38 |
Correct |
617 ms |
75248 KB |
Output is correct |
39 |
Correct |
958 ms |
80728 KB |
Output is correct |
40 |
Correct |
596 ms |
80712 KB |
Output is correct |
41 |
Correct |
44 ms |
47864 KB |
Output is correct |
42 |
Correct |
1279 ms |
78904 KB |
Output is correct |
43 |
Correct |
765 ms |
74196 KB |
Output is correct |
44 |
Correct |
957 ms |
77680 KB |
Output is correct |
45 |
Correct |
1177 ms |
78456 KB |
Output is correct |
46 |
Correct |
1798 ms |
177424 KB |
Output is correct |
47 |
Correct |
3121 ms |
164764 KB |
Output is correct |
48 |
Correct |
5043 ms |
191964 KB |
Output is correct |
49 |
Correct |
3006 ms |
191760 KB |
Output is correct |
50 |
Correct |
7429 ms |
181384 KB |
Output is correct |
51 |
Correct |
4083 ms |
154856 KB |
Output is correct |
52 |
Correct |
4734 ms |
168212 KB |
Output is correct |
53 |
Correct |
6856 ms |
184196 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
679 ms |
77340 KB |
Output is correct |
2 |
Correct |
622 ms |
77744 KB |
Output is correct |
3 |
Correct |
298 ms |
71912 KB |
Output is correct |
4 |
Correct |
553 ms |
73464 KB |
Output is correct |
5 |
Correct |
44 ms |
47736 KB |
Output is correct |
6 |
Correct |
626 ms |
76148 KB |
Output is correct |
7 |
Correct |
166 ms |
62712 KB |
Output is correct |
8 |
Correct |
164 ms |
60392 KB |
Output is correct |
9 |
Correct |
303 ms |
71932 KB |
Output is correct |
10 |
Correct |
695 ms |
80760 KB |
Output is correct |
11 |
Correct |
231 ms |
72040 KB |
Output is correct |
12 |
Correct |
44 ms |
47740 KB |
Output is correct |
13 |
Correct |
44 ms |
47736 KB |
Output is correct |
14 |
Correct |
44 ms |
47740 KB |
Output is correct |
15 |
Correct |
48 ms |
47864 KB |
Output is correct |
16 |
Correct |
45 ms |
47864 KB |
Output is correct |
17 |
Correct |
45 ms |
47892 KB |
Output is correct |
18 |
Correct |
44 ms |
47864 KB |
Output is correct |
19 |
Correct |
45 ms |
47864 KB |
Output is correct |
20 |
Correct |
44 ms |
47864 KB |
Output is correct |
21 |
Correct |
44 ms |
47864 KB |
Output is correct |
22 |
Correct |
44 ms |
47864 KB |
Output is correct |
23 |
Correct |
45 ms |
47736 KB |
Output is correct |
24 |
Correct |
45 ms |
47864 KB |
Output is correct |
25 |
Correct |
44 ms |
47864 KB |
Output is correct |
26 |
Correct |
53 ms |
47864 KB |
Output is correct |
27 |
Correct |
45 ms |
47740 KB |
Output is correct |
28 |
Correct |
48 ms |
48196 KB |
Output is correct |
29 |
Correct |
47 ms |
48120 KB |
Output is correct |
30 |
Correct |
52 ms |
48120 KB |
Output is correct |
31 |
Correct |
51 ms |
48120 KB |
Output is correct |
32 |
Correct |
51 ms |
48120 KB |
Output is correct |
33 |
Correct |
52 ms |
48120 KB |
Output is correct |
34 |
Correct |
51 ms |
48248 KB |
Output is correct |
35 |
Correct |
332 ms |
72868 KB |
Output is correct |
36 |
Correct |
269 ms |
71180 KB |
Output is correct |
37 |
Correct |
354 ms |
77560 KB |
Output is correct |
38 |
Correct |
606 ms |
75376 KB |
Output is correct |
39 |
Correct |
520 ms |
76048 KB |
Output is correct |
40 |
Correct |
271 ms |
71868 KB |
Output is correct |
41 |
Correct |
1217 ms |
78624 KB |
Output is correct |
42 |
Correct |
160 ms |
63320 KB |
Output is correct |
43 |
Correct |
195 ms |
64536 KB |
Output is correct |
44 |
Correct |
724 ms |
73848 KB |
Output is correct |
45 |
Correct |
879 ms |
77188 KB |
Output is correct |
46 |
Correct |
1128 ms |
78256 KB |
Output is correct |
47 |
Correct |
1133 ms |
78200 KB |
Output is correct |
48 |
Correct |
384 ms |
77572 KB |
Output is correct |
49 |
Correct |
617 ms |
75248 KB |
Output is correct |
50 |
Correct |
958 ms |
80728 KB |
Output is correct |
51 |
Correct |
596 ms |
80712 KB |
Output is correct |
52 |
Correct |
44 ms |
47864 KB |
Output is correct |
53 |
Correct |
1279 ms |
78904 KB |
Output is correct |
54 |
Correct |
765 ms |
74196 KB |
Output is correct |
55 |
Correct |
957 ms |
77680 KB |
Output is correct |
56 |
Correct |
1177 ms |
78456 KB |
Output is correct |
57 |
Correct |
611 ms |
76040 KB |
Output is correct |
58 |
Correct |
377 ms |
76024 KB |
Output is correct |
59 |
Correct |
448 ms |
75020 KB |
Output is correct |
60 |
Correct |
1441 ms |
72312 KB |
Output is correct |
61 |
Correct |
301 ms |
61836 KB |
Output is correct |
62 |
Correct |
44 ms |
47864 KB |
Output is correct |
63 |
Correct |
1290 ms |
76696 KB |
Output is correct |
64 |
Correct |
770 ms |
72448 KB |
Output is correct |
65 |
Correct |
1008 ms |
75296 KB |
Output is correct |
66 |
Correct |
1188 ms |
74828 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
679 ms |
77340 KB |
Output is correct |
2 |
Correct |
622 ms |
77744 KB |
Output is correct |
3 |
Correct |
298 ms |
71912 KB |
Output is correct |
4 |
Correct |
553 ms |
73464 KB |
Output is correct |
5 |
Correct |
44 ms |
47736 KB |
Output is correct |
6 |
Correct |
626 ms |
76148 KB |
Output is correct |
7 |
Correct |
166 ms |
62712 KB |
Output is correct |
8 |
Correct |
164 ms |
60392 KB |
Output is correct |
9 |
Correct |
303 ms |
71932 KB |
Output is correct |
10 |
Correct |
695 ms |
80760 KB |
Output is correct |
11 |
Correct |
231 ms |
72040 KB |
Output is correct |
12 |
Correct |
44 ms |
47740 KB |
Output is correct |
13 |
Correct |
44 ms |
47736 KB |
Output is correct |
14 |
Correct |
44 ms |
47740 KB |
Output is correct |
15 |
Correct |
48 ms |
47864 KB |
Output is correct |
16 |
Correct |
45 ms |
47864 KB |
Output is correct |
17 |
Correct |
45 ms |
47892 KB |
Output is correct |
18 |
Correct |
44 ms |
47864 KB |
Output is correct |
19 |
Correct |
45 ms |
47864 KB |
Output is correct |
20 |
Correct |
44 ms |
47864 KB |
Output is correct |
21 |
Correct |
44 ms |
47864 KB |
Output is correct |
22 |
Correct |
44 ms |
47864 KB |
Output is correct |
23 |
Correct |
45 ms |
47736 KB |
Output is correct |
24 |
Correct |
45 ms |
47864 KB |
Output is correct |
25 |
Correct |
44 ms |
47864 KB |
Output is correct |
26 |
Correct |
53 ms |
47864 KB |
Output is correct |
27 |
Correct |
45 ms |
47740 KB |
Output is correct |
28 |
Correct |
48 ms |
48196 KB |
Output is correct |
29 |
Correct |
47 ms |
48120 KB |
Output is correct |
30 |
Correct |
52 ms |
48120 KB |
Output is correct |
31 |
Correct |
51 ms |
48120 KB |
Output is correct |
32 |
Correct |
51 ms |
48120 KB |
Output is correct |
33 |
Correct |
52 ms |
48120 KB |
Output is correct |
34 |
Correct |
51 ms |
48248 KB |
Output is correct |
35 |
Correct |
332 ms |
72868 KB |
Output is correct |
36 |
Correct |
269 ms |
71180 KB |
Output is correct |
37 |
Correct |
354 ms |
77560 KB |
Output is correct |
38 |
Correct |
606 ms |
75376 KB |
Output is correct |
39 |
Correct |
520 ms |
76048 KB |
Output is correct |
40 |
Correct |
271 ms |
71868 KB |
Output is correct |
41 |
Correct |
1217 ms |
78624 KB |
Output is correct |
42 |
Correct |
160 ms |
63320 KB |
Output is correct |
43 |
Correct |
195 ms |
64536 KB |
Output is correct |
44 |
Correct |
724 ms |
73848 KB |
Output is correct |
45 |
Correct |
879 ms |
77188 KB |
Output is correct |
46 |
Correct |
1128 ms |
78256 KB |
Output is correct |
47 |
Correct |
1133 ms |
78200 KB |
Output is correct |
48 |
Correct |
384 ms |
77572 KB |
Output is correct |
49 |
Correct |
617 ms |
75248 KB |
Output is correct |
50 |
Correct |
958 ms |
80728 KB |
Output is correct |
51 |
Correct |
596 ms |
80712 KB |
Output is correct |
52 |
Correct |
44 ms |
47864 KB |
Output is correct |
53 |
Correct |
1279 ms |
78904 KB |
Output is correct |
54 |
Correct |
765 ms |
74196 KB |
Output is correct |
55 |
Correct |
957 ms |
77680 KB |
Output is correct |
56 |
Correct |
1177 ms |
78456 KB |
Output is correct |
57 |
Correct |
1798 ms |
177424 KB |
Output is correct |
58 |
Correct |
3121 ms |
164764 KB |
Output is correct |
59 |
Correct |
5043 ms |
191964 KB |
Output is correct |
60 |
Correct |
3006 ms |
191760 KB |
Output is correct |
61 |
Correct |
7429 ms |
181384 KB |
Output is correct |
62 |
Correct |
4083 ms |
154856 KB |
Output is correct |
63 |
Correct |
4734 ms |
168212 KB |
Output is correct |
64 |
Correct |
6856 ms |
184196 KB |
Output is correct |
65 |
Correct |
611 ms |
76040 KB |
Output is correct |
66 |
Correct |
377 ms |
76024 KB |
Output is correct |
67 |
Correct |
448 ms |
75020 KB |
Output is correct |
68 |
Correct |
1441 ms |
72312 KB |
Output is correct |
69 |
Correct |
301 ms |
61836 KB |
Output is correct |
70 |
Correct |
44 ms |
47864 KB |
Output is correct |
71 |
Correct |
1290 ms |
76696 KB |
Output is correct |
72 |
Correct |
770 ms |
72448 KB |
Output is correct |
73 |
Correct |
1008 ms |
75296 KB |
Output is correct |
74 |
Correct |
1188 ms |
74828 KB |
Output is correct |
75 |
Correct |
3216 ms |
151628 KB |
Output is correct |
76 |
Correct |
1738 ms |
159356 KB |
Output is correct |
77 |
Correct |
2089 ms |
159236 KB |
Output is correct |
78 |
Correct |
8205 ms |
151548 KB |
Output is correct |
79 |
Correct |
7798 ms |
173840 KB |
Output is correct |
80 |
Correct |
4305 ms |
151384 KB |
Output is correct |
81 |
Correct |
5299 ms |
163784 KB |
Output is correct |
82 |
Correct |
7170 ms |
184792 KB |
Output is correct |
83 |
Correct |
7134 ms |
172188 KB |
Output is correct |