#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ar array
const int mxN=250000;
int n, m, q, qs[mxN], ans[mxN];
ar<ll, 3> st[1<<19]; // sum, suf, sum of negs
vector<ar<int, 2>> changes[mxN];
vector<ar<ll, 2>> qq[mxN];
ar<ll, 3> cmb(ar<ll, 3> a, ar<ll, 3> b) {
return {a[0]+b[0], max(a[1]+b[0], b[1]), a[2]+b[2]};
}
void upd(int i, int x, int u=1, int l=0, int r=q-1) {
if (l==r) {
st[u][0]+=x;
st[u][1]=max(st[u][0], 0ll);
st[u][2]=min(st[u][0], 0ll);
return;
}
int mid=(l+r)/2;
if (i<=mid)
upd(i, x, 2*u, l, mid);
else
upd(i, x, 2*u+1, mid+1, r);
st[u]=cmb(st[2*u], st[2*u+1]);
}
ar<ll, 3> qry1(int ql, int qr, int u=1, int l=0, int r=q-1) {
if (l>qr||r<ql)
return {};
if (ql<=l&&r<=qr)
return st[u];
int mid=(l+r)/2;
return cmb(qry1(ql, qr, 2*u, l, mid), qry1(ql, qr, 2*u+1, mid+1, r));
}
ar<ll, 2> qry2(int ql, ll k, int u=1, int l=0, int r=q-1) {
//cout << ql << " " << k << " " << l << " " << r << endl;
if (r<ql)
return {-1, k};
if (ql<=l&&st[u][0]-st[u][2]<k)
return {-1, k-(st[u][0]-st[u][2])};
if (l==r)
return {l, 0};
int mid=(l+r)/2;
ar<ll, 2> x=qry2(ql, k, 2*u, l, mid);
if (x[0]!=-1)
return x;
return qry2(ql, x[1], 2*u+1, mid+1, r);
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n >> m >> q;
for (int i=0; i<q; ++i) {
int t;
cin >> t;
if (t==1) {
int l, r, c, k;
cin >> l >> r >> c >> k, --l, --r;
qs[i]=c;
changes[l].push_back({i, k});
if (r+1<n)
changes[r+1].push_back({i, -k});
} else if (t==2) {
int l, r, k;
cin >> l >> r >> k, --l, --r;
changes[l].push_back({i, -k});
if (r+1<n)
changes[r+1].push_back({i, k});
} else {
int a;
ll b;
cin >> a >> b, --a;
qq[a].push_back({i, b});
}
ans[i]=-1;
}
for (int i=0; i<n; ++i) {
for (auto [t, k] : changes[i]) {
//cout << "change at time: " << t << " " << k << endl;
upd(t, k);
}
for (auto [ind, k] : qq[i]) {
ar<ll, 3> x=qry1(0, ind);
if (x[1]<k) {
ans[ind]=0;
continue;
}
int lb=0, rb=ind;
while(lb<rb) {
int mid=(lb+rb+1)/2;
if (qry1(mid, ind)[1]==x[1])
lb=mid;
else
rb=mid-1;
}
ll neg=qry1(lb, ind)[2];
//cout << lb << " " << ind << " " << neg << " " << k-neg << endl;
ans[ind]=qs[qry2(lb, k-neg)[0]];
}
}
for (int i=0; i<q; ++i)
if (~ans[i])
cout << ans[i] << "\n";
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
15184 KB |
Output is correct |
2 |
Correct |
5 ms |
14928 KB |
Output is correct |
3 |
Correct |
5 ms |
14976 KB |
Output is correct |
4 |
Correct |
6 ms |
14928 KB |
Output is correct |
5 |
Correct |
5 ms |
14928 KB |
Output is correct |
6 |
Correct |
5 ms |
14928 KB |
Output is correct |
7 |
Correct |
5 ms |
14928 KB |
Output is correct |
8 |
Correct |
5 ms |
14928 KB |
Output is correct |
9 |
Correct |
5 ms |
15036 KB |
Output is correct |
10 |
Correct |
6 ms |
14928 KB |
Output is correct |
11 |
Correct |
7 ms |
14928 KB |
Output is correct |
12 |
Correct |
6 ms |
15016 KB |
Output is correct |
13 |
Correct |
4 ms |
14928 KB |
Output is correct |
14 |
Correct |
7 ms |
14928 KB |
Output is correct |
15 |
Correct |
4 ms |
14928 KB |
Output is correct |
16 |
Correct |
5 ms |
14928 KB |
Output is correct |
17 |
Correct |
5 ms |
14940 KB |
Output is correct |
18 |
Correct |
5 ms |
14928 KB |
Output is correct |
19 |
Correct |
5 ms |
15108 KB |
Output is correct |
20 |
Correct |
5 ms |
14928 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
15184 KB |
Output is correct |
2 |
Correct |
5 ms |
14928 KB |
Output is correct |
3 |
Correct |
5 ms |
14976 KB |
Output is correct |
4 |
Correct |
6 ms |
14928 KB |
Output is correct |
5 |
Correct |
5 ms |
14928 KB |
Output is correct |
6 |
Correct |
5 ms |
14928 KB |
Output is correct |
7 |
Correct |
5 ms |
14928 KB |
Output is correct |
8 |
Correct |
5 ms |
14928 KB |
Output is correct |
9 |
Correct |
5 ms |
15036 KB |
Output is correct |
10 |
Correct |
6 ms |
14928 KB |
Output is correct |
11 |
Correct |
7 ms |
14928 KB |
Output is correct |
12 |
Correct |
6 ms |
15016 KB |
Output is correct |
13 |
Correct |
4 ms |
14928 KB |
Output is correct |
14 |
Correct |
7 ms |
14928 KB |
Output is correct |
15 |
Correct |
4 ms |
14928 KB |
Output is correct |
16 |
Correct |
5 ms |
14928 KB |
Output is correct |
17 |
Correct |
5 ms |
14940 KB |
Output is correct |
18 |
Correct |
5 ms |
14928 KB |
Output is correct |
19 |
Correct |
5 ms |
15108 KB |
Output is correct |
20 |
Correct |
5 ms |
14928 KB |
Output is correct |
21 |
Correct |
6 ms |
14928 KB |
Output is correct |
22 |
Correct |
5 ms |
15084 KB |
Output is correct |
23 |
Correct |
5 ms |
14928 KB |
Output is correct |
24 |
Correct |
5 ms |
14928 KB |
Output is correct |
25 |
Correct |
5 ms |
14928 KB |
Output is correct |
26 |
Correct |
7 ms |
14928 KB |
Output is correct |
27 |
Correct |
6 ms |
14928 KB |
Output is correct |
28 |
Correct |
8 ms |
14928 KB |
Output is correct |
29 |
Correct |
5 ms |
14928 KB |
Output is correct |
30 |
Correct |
5 ms |
14928 KB |
Output is correct |
31 |
Correct |
5 ms |
14928 KB |
Output is correct |
32 |
Correct |
5 ms |
14964 KB |
Output is correct |
33 |
Correct |
4 ms |
14928 KB |
Output is correct |
34 |
Correct |
4 ms |
15016 KB |
Output is correct |
35 |
Correct |
5 ms |
14928 KB |
Output is correct |
36 |
Correct |
5 ms |
14928 KB |
Output is correct |
37 |
Correct |
4 ms |
14928 KB |
Output is correct |
38 |
Correct |
5 ms |
14928 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
48 ms |
21080 KB |
Output is correct |
2 |
Correct |
51 ms |
21072 KB |
Output is correct |
3 |
Correct |
48 ms |
21064 KB |
Output is correct |
4 |
Correct |
57 ms |
21048 KB |
Output is correct |
5 |
Correct |
50 ms |
21124 KB |
Output is correct |
6 |
Correct |
49 ms |
21064 KB |
Output is correct |
7 |
Correct |
54 ms |
19024 KB |
Output is correct |
8 |
Correct |
64 ms |
19260 KB |
Output is correct |
9 |
Correct |
51 ms |
21064 KB |
Output is correct |
10 |
Correct |
50 ms |
21064 KB |
Output is correct |
11 |
Correct |
60 ms |
21064 KB |
Output is correct |
12 |
Correct |
49 ms |
21052 KB |
Output is correct |
13 |
Correct |
67 ms |
20508 KB |
Output is correct |
14 |
Correct |
69 ms |
20816 KB |
Output is correct |
15 |
Correct |
51 ms |
20808 KB |
Output is correct |
16 |
Correct |
51 ms |
20912 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
536 ms |
39764 KB |
Output is correct |
2 |
Correct |
404 ms |
36936 KB |
Output is correct |
3 |
Correct |
612 ms |
41292 KB |
Output is correct |
4 |
Correct |
379 ms |
37296 KB |
Output is correct |
5 |
Correct |
387 ms |
36944 KB |
Output is correct |
6 |
Correct |
545 ms |
41448 KB |
Output is correct |
7 |
Correct |
408 ms |
34748 KB |
Output is correct |
8 |
Correct |
424 ms |
33624 KB |
Output is correct |
9 |
Correct |
773 ms |
41544 KB |
Output is correct |
10 |
Correct |
728 ms |
41288 KB |
Output is correct |
11 |
Correct |
506 ms |
40776 KB |
Output is correct |
12 |
Correct |
527 ms |
41288 KB |
Output is correct |
13 |
Correct |
460 ms |
40776 KB |
Output is correct |
14 |
Correct |
470 ms |
41288 KB |
Output is correct |
15 |
Correct |
491 ms |
41200 KB |
Output is correct |
16 |
Correct |
468 ms |
41192 KB |
Output is correct |
17 |
Correct |
541 ms |
41288 KB |
Output is correct |
18 |
Correct |
493 ms |
41032 KB |
Output is correct |
19 |
Correct |
485 ms |
41368 KB |
Output is correct |
20 |
Correct |
452 ms |
41024 KB |
Output is correct |
21 |
Correct |
480 ms |
41136 KB |
Output is correct |
22 |
Correct |
500 ms |
41288 KB |
Output is correct |
23 |
Correct |
554 ms |
41292 KB |
Output is correct |
24 |
Correct |
466 ms |
41180 KB |
Output is correct |
25 |
Correct |
535 ms |
38816 KB |
Output is correct |
26 |
Correct |
563 ms |
39096 KB |
Output is correct |
27 |
Correct |
418 ms |
40520 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
15184 KB |
Output is correct |
2 |
Correct |
5 ms |
14928 KB |
Output is correct |
3 |
Correct |
5 ms |
14976 KB |
Output is correct |
4 |
Correct |
6 ms |
14928 KB |
Output is correct |
5 |
Correct |
5 ms |
14928 KB |
Output is correct |
6 |
Correct |
5 ms |
14928 KB |
Output is correct |
7 |
Correct |
5 ms |
14928 KB |
Output is correct |
8 |
Correct |
5 ms |
14928 KB |
Output is correct |
9 |
Correct |
5 ms |
15036 KB |
Output is correct |
10 |
Correct |
6 ms |
14928 KB |
Output is correct |
11 |
Correct |
7 ms |
14928 KB |
Output is correct |
12 |
Correct |
6 ms |
15016 KB |
Output is correct |
13 |
Correct |
4 ms |
14928 KB |
Output is correct |
14 |
Correct |
7 ms |
14928 KB |
Output is correct |
15 |
Correct |
4 ms |
14928 KB |
Output is correct |
16 |
Correct |
5 ms |
14928 KB |
Output is correct |
17 |
Correct |
5 ms |
14940 KB |
Output is correct |
18 |
Correct |
5 ms |
14928 KB |
Output is correct |
19 |
Correct |
5 ms |
15108 KB |
Output is correct |
20 |
Correct |
5 ms |
14928 KB |
Output is correct |
21 |
Correct |
48 ms |
21080 KB |
Output is correct |
22 |
Correct |
51 ms |
21072 KB |
Output is correct |
23 |
Correct |
48 ms |
21064 KB |
Output is correct |
24 |
Correct |
57 ms |
21048 KB |
Output is correct |
25 |
Correct |
50 ms |
21124 KB |
Output is correct |
26 |
Correct |
49 ms |
21064 KB |
Output is correct |
27 |
Correct |
54 ms |
19024 KB |
Output is correct |
28 |
Correct |
64 ms |
19260 KB |
Output is correct |
29 |
Correct |
51 ms |
21064 KB |
Output is correct |
30 |
Correct |
50 ms |
21064 KB |
Output is correct |
31 |
Correct |
60 ms |
21064 KB |
Output is correct |
32 |
Correct |
49 ms |
21052 KB |
Output is correct |
33 |
Correct |
67 ms |
20508 KB |
Output is correct |
34 |
Correct |
69 ms |
20816 KB |
Output is correct |
35 |
Correct |
51 ms |
20808 KB |
Output is correct |
36 |
Correct |
51 ms |
20912 KB |
Output is correct |
37 |
Correct |
102 ms |
20552 KB |
Output is correct |
38 |
Correct |
86 ms |
20288 KB |
Output is correct |
39 |
Correct |
60 ms |
18884 KB |
Output is correct |
40 |
Correct |
74 ms |
18812 KB |
Output is correct |
41 |
Correct |
110 ms |
20828 KB |
Output is correct |
42 |
Correct |
103 ms |
20816 KB |
Output is correct |
43 |
Correct |
102 ms |
20828 KB |
Output is correct |
44 |
Correct |
98 ms |
20808 KB |
Output is correct |
45 |
Correct |
101 ms |
20888 KB |
Output is correct |
46 |
Correct |
103 ms |
20824 KB |
Output is correct |
47 |
Correct |
108 ms |
19400 KB |
Output is correct |
48 |
Correct |
109 ms |
20308 KB |
Output is correct |
49 |
Correct |
61 ms |
19792 KB |
Output is correct |
50 |
Correct |
80 ms |
20304 KB |
Output is correct |
51 |
Correct |
92 ms |
20816 KB |
Output is correct |
52 |
Correct |
86 ms |
20816 KB |
Output is correct |
53 |
Correct |
40 ms |
20348 KB |
Output is correct |
54 |
Correct |
47 ms |
21152 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
140 ms |
21096 KB |
Output is correct |
2 |
Correct |
149 ms |
21332 KB |
Output is correct |
3 |
Correct |
149 ms |
21488 KB |
Output is correct |
4 |
Correct |
115 ms |
20428 KB |
Output is correct |
5 |
Correct |
124 ms |
21064 KB |
Output is correct |
6 |
Correct |
153 ms |
21548 KB |
Output is correct |
7 |
Correct |
96 ms |
19652 KB |
Output is correct |
8 |
Correct |
109 ms |
19468 KB |
Output is correct |
9 |
Correct |
129 ms |
20420 KB |
Output is correct |
10 |
Correct |
92 ms |
19960 KB |
Output is correct |
11 |
Correct |
130 ms |
20820 KB |
Output is correct |
12 |
Correct |
148 ms |
20808 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
15184 KB |
Output is correct |
2 |
Correct |
5 ms |
14928 KB |
Output is correct |
3 |
Correct |
5 ms |
14976 KB |
Output is correct |
4 |
Correct |
6 ms |
14928 KB |
Output is correct |
5 |
Correct |
5 ms |
14928 KB |
Output is correct |
6 |
Correct |
5 ms |
14928 KB |
Output is correct |
7 |
Correct |
5 ms |
14928 KB |
Output is correct |
8 |
Correct |
5 ms |
14928 KB |
Output is correct |
9 |
Correct |
5 ms |
15036 KB |
Output is correct |
10 |
Correct |
6 ms |
14928 KB |
Output is correct |
11 |
Correct |
7 ms |
14928 KB |
Output is correct |
12 |
Correct |
6 ms |
15016 KB |
Output is correct |
13 |
Correct |
4 ms |
14928 KB |
Output is correct |
14 |
Correct |
7 ms |
14928 KB |
Output is correct |
15 |
Correct |
4 ms |
14928 KB |
Output is correct |
16 |
Correct |
5 ms |
14928 KB |
Output is correct |
17 |
Correct |
5 ms |
14940 KB |
Output is correct |
18 |
Correct |
5 ms |
14928 KB |
Output is correct |
19 |
Correct |
5 ms |
15108 KB |
Output is correct |
20 |
Correct |
5 ms |
14928 KB |
Output is correct |
21 |
Correct |
6 ms |
14928 KB |
Output is correct |
22 |
Correct |
5 ms |
15084 KB |
Output is correct |
23 |
Correct |
5 ms |
14928 KB |
Output is correct |
24 |
Correct |
5 ms |
14928 KB |
Output is correct |
25 |
Correct |
5 ms |
14928 KB |
Output is correct |
26 |
Correct |
7 ms |
14928 KB |
Output is correct |
27 |
Correct |
6 ms |
14928 KB |
Output is correct |
28 |
Correct |
8 ms |
14928 KB |
Output is correct |
29 |
Correct |
5 ms |
14928 KB |
Output is correct |
30 |
Correct |
5 ms |
14928 KB |
Output is correct |
31 |
Correct |
5 ms |
14928 KB |
Output is correct |
32 |
Correct |
5 ms |
14964 KB |
Output is correct |
33 |
Correct |
4 ms |
14928 KB |
Output is correct |
34 |
Correct |
4 ms |
15016 KB |
Output is correct |
35 |
Correct |
5 ms |
14928 KB |
Output is correct |
36 |
Correct |
5 ms |
14928 KB |
Output is correct |
37 |
Correct |
4 ms |
14928 KB |
Output is correct |
38 |
Correct |
5 ms |
14928 KB |
Output is correct |
39 |
Correct |
48 ms |
21080 KB |
Output is correct |
40 |
Correct |
51 ms |
21072 KB |
Output is correct |
41 |
Correct |
48 ms |
21064 KB |
Output is correct |
42 |
Correct |
57 ms |
21048 KB |
Output is correct |
43 |
Correct |
50 ms |
21124 KB |
Output is correct |
44 |
Correct |
49 ms |
21064 KB |
Output is correct |
45 |
Correct |
54 ms |
19024 KB |
Output is correct |
46 |
Correct |
64 ms |
19260 KB |
Output is correct |
47 |
Correct |
51 ms |
21064 KB |
Output is correct |
48 |
Correct |
50 ms |
21064 KB |
Output is correct |
49 |
Correct |
60 ms |
21064 KB |
Output is correct |
50 |
Correct |
49 ms |
21052 KB |
Output is correct |
51 |
Correct |
67 ms |
20508 KB |
Output is correct |
52 |
Correct |
69 ms |
20816 KB |
Output is correct |
53 |
Correct |
51 ms |
20808 KB |
Output is correct |
54 |
Correct |
51 ms |
20912 KB |
Output is correct |
55 |
Correct |
102 ms |
20552 KB |
Output is correct |
56 |
Correct |
86 ms |
20288 KB |
Output is correct |
57 |
Correct |
60 ms |
18884 KB |
Output is correct |
58 |
Correct |
74 ms |
18812 KB |
Output is correct |
59 |
Correct |
110 ms |
20828 KB |
Output is correct |
60 |
Correct |
103 ms |
20816 KB |
Output is correct |
61 |
Correct |
102 ms |
20828 KB |
Output is correct |
62 |
Correct |
98 ms |
20808 KB |
Output is correct |
63 |
Correct |
101 ms |
20888 KB |
Output is correct |
64 |
Correct |
103 ms |
20824 KB |
Output is correct |
65 |
Correct |
108 ms |
19400 KB |
Output is correct |
66 |
Correct |
109 ms |
20308 KB |
Output is correct |
67 |
Correct |
61 ms |
19792 KB |
Output is correct |
68 |
Correct |
80 ms |
20304 KB |
Output is correct |
69 |
Correct |
92 ms |
20816 KB |
Output is correct |
70 |
Correct |
86 ms |
20816 KB |
Output is correct |
71 |
Correct |
40 ms |
20348 KB |
Output is correct |
72 |
Correct |
47 ms |
21152 KB |
Output is correct |
73 |
Correct |
140 ms |
21096 KB |
Output is correct |
74 |
Correct |
149 ms |
21332 KB |
Output is correct |
75 |
Correct |
149 ms |
21488 KB |
Output is correct |
76 |
Correct |
115 ms |
20428 KB |
Output is correct |
77 |
Correct |
124 ms |
21064 KB |
Output is correct |
78 |
Correct |
153 ms |
21548 KB |
Output is correct |
79 |
Correct |
96 ms |
19652 KB |
Output is correct |
80 |
Correct |
109 ms |
19468 KB |
Output is correct |
81 |
Correct |
129 ms |
20420 KB |
Output is correct |
82 |
Correct |
92 ms |
19960 KB |
Output is correct |
83 |
Correct |
130 ms |
20820 KB |
Output is correct |
84 |
Correct |
148 ms |
20808 KB |
Output is correct |
85 |
Correct |
123 ms |
21064 KB |
Output is correct |
86 |
Correct |
117 ms |
21344 KB |
Output is correct |
87 |
Correct |
85 ms |
21064 KB |
Output is correct |
88 |
Correct |
104 ms |
21576 KB |
Output is correct |
89 |
Correct |
67 ms |
20096 KB |
Output is correct |
90 |
Correct |
104 ms |
21320 KB |
Output is correct |
91 |
Correct |
85 ms |
20552 KB |
Output is correct |
92 |
Correct |
81 ms |
20320 KB |
Output is correct |
93 |
Correct |
103 ms |
21520 KB |
Output is correct |
94 |
Correct |
96 ms |
21396 KB |
Output is correct |
95 |
Correct |
102 ms |
21340 KB |
Output is correct |
96 |
Correct |
103 ms |
21484 KB |
Output is correct |
97 |
Correct |
98 ms |
21320 KB |
Output is correct |
98 |
Correct |
84 ms |
20808 KB |
Output is correct |
99 |
Correct |
100 ms |
19904 KB |
Output is correct |
100 |
Correct |
101 ms |
20048 KB |
Output is correct |
101 |
Correct |
125 ms |
20808 KB |
Output is correct |
102 |
Correct |
89 ms |
21384 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
15184 KB |
Output is correct |
2 |
Correct |
5 ms |
14928 KB |
Output is correct |
3 |
Correct |
5 ms |
14976 KB |
Output is correct |
4 |
Correct |
6 ms |
14928 KB |
Output is correct |
5 |
Correct |
5 ms |
14928 KB |
Output is correct |
6 |
Correct |
5 ms |
14928 KB |
Output is correct |
7 |
Correct |
5 ms |
14928 KB |
Output is correct |
8 |
Correct |
5 ms |
14928 KB |
Output is correct |
9 |
Correct |
5 ms |
15036 KB |
Output is correct |
10 |
Correct |
6 ms |
14928 KB |
Output is correct |
11 |
Correct |
7 ms |
14928 KB |
Output is correct |
12 |
Correct |
6 ms |
15016 KB |
Output is correct |
13 |
Correct |
4 ms |
14928 KB |
Output is correct |
14 |
Correct |
7 ms |
14928 KB |
Output is correct |
15 |
Correct |
4 ms |
14928 KB |
Output is correct |
16 |
Correct |
5 ms |
14928 KB |
Output is correct |
17 |
Correct |
5 ms |
14940 KB |
Output is correct |
18 |
Correct |
5 ms |
14928 KB |
Output is correct |
19 |
Correct |
5 ms |
15108 KB |
Output is correct |
20 |
Correct |
5 ms |
14928 KB |
Output is correct |
21 |
Correct |
6 ms |
14928 KB |
Output is correct |
22 |
Correct |
5 ms |
15084 KB |
Output is correct |
23 |
Correct |
5 ms |
14928 KB |
Output is correct |
24 |
Correct |
5 ms |
14928 KB |
Output is correct |
25 |
Correct |
5 ms |
14928 KB |
Output is correct |
26 |
Correct |
7 ms |
14928 KB |
Output is correct |
27 |
Correct |
6 ms |
14928 KB |
Output is correct |
28 |
Correct |
8 ms |
14928 KB |
Output is correct |
29 |
Correct |
5 ms |
14928 KB |
Output is correct |
30 |
Correct |
5 ms |
14928 KB |
Output is correct |
31 |
Correct |
5 ms |
14928 KB |
Output is correct |
32 |
Correct |
5 ms |
14964 KB |
Output is correct |
33 |
Correct |
4 ms |
14928 KB |
Output is correct |
34 |
Correct |
4 ms |
15016 KB |
Output is correct |
35 |
Correct |
5 ms |
14928 KB |
Output is correct |
36 |
Correct |
5 ms |
14928 KB |
Output is correct |
37 |
Correct |
4 ms |
14928 KB |
Output is correct |
38 |
Correct |
5 ms |
14928 KB |
Output is correct |
39 |
Correct |
48 ms |
21080 KB |
Output is correct |
40 |
Correct |
51 ms |
21072 KB |
Output is correct |
41 |
Correct |
48 ms |
21064 KB |
Output is correct |
42 |
Correct |
57 ms |
21048 KB |
Output is correct |
43 |
Correct |
50 ms |
21124 KB |
Output is correct |
44 |
Correct |
49 ms |
21064 KB |
Output is correct |
45 |
Correct |
54 ms |
19024 KB |
Output is correct |
46 |
Correct |
64 ms |
19260 KB |
Output is correct |
47 |
Correct |
51 ms |
21064 KB |
Output is correct |
48 |
Correct |
50 ms |
21064 KB |
Output is correct |
49 |
Correct |
60 ms |
21064 KB |
Output is correct |
50 |
Correct |
49 ms |
21052 KB |
Output is correct |
51 |
Correct |
67 ms |
20508 KB |
Output is correct |
52 |
Correct |
69 ms |
20816 KB |
Output is correct |
53 |
Correct |
51 ms |
20808 KB |
Output is correct |
54 |
Correct |
51 ms |
20912 KB |
Output is correct |
55 |
Correct |
536 ms |
39764 KB |
Output is correct |
56 |
Correct |
404 ms |
36936 KB |
Output is correct |
57 |
Correct |
612 ms |
41292 KB |
Output is correct |
58 |
Correct |
379 ms |
37296 KB |
Output is correct |
59 |
Correct |
387 ms |
36944 KB |
Output is correct |
60 |
Correct |
545 ms |
41448 KB |
Output is correct |
61 |
Correct |
408 ms |
34748 KB |
Output is correct |
62 |
Correct |
424 ms |
33624 KB |
Output is correct |
63 |
Correct |
773 ms |
41544 KB |
Output is correct |
64 |
Correct |
728 ms |
41288 KB |
Output is correct |
65 |
Correct |
506 ms |
40776 KB |
Output is correct |
66 |
Correct |
527 ms |
41288 KB |
Output is correct |
67 |
Correct |
460 ms |
40776 KB |
Output is correct |
68 |
Correct |
470 ms |
41288 KB |
Output is correct |
69 |
Correct |
491 ms |
41200 KB |
Output is correct |
70 |
Correct |
468 ms |
41192 KB |
Output is correct |
71 |
Correct |
541 ms |
41288 KB |
Output is correct |
72 |
Correct |
493 ms |
41032 KB |
Output is correct |
73 |
Correct |
485 ms |
41368 KB |
Output is correct |
74 |
Correct |
452 ms |
41024 KB |
Output is correct |
75 |
Correct |
480 ms |
41136 KB |
Output is correct |
76 |
Correct |
500 ms |
41288 KB |
Output is correct |
77 |
Correct |
554 ms |
41292 KB |
Output is correct |
78 |
Correct |
466 ms |
41180 KB |
Output is correct |
79 |
Correct |
535 ms |
38816 KB |
Output is correct |
80 |
Correct |
563 ms |
39096 KB |
Output is correct |
81 |
Correct |
418 ms |
40520 KB |
Output is correct |
82 |
Correct |
102 ms |
20552 KB |
Output is correct |
83 |
Correct |
86 ms |
20288 KB |
Output is correct |
84 |
Correct |
60 ms |
18884 KB |
Output is correct |
85 |
Correct |
74 ms |
18812 KB |
Output is correct |
86 |
Correct |
110 ms |
20828 KB |
Output is correct |
87 |
Correct |
103 ms |
20816 KB |
Output is correct |
88 |
Correct |
102 ms |
20828 KB |
Output is correct |
89 |
Correct |
98 ms |
20808 KB |
Output is correct |
90 |
Correct |
101 ms |
20888 KB |
Output is correct |
91 |
Correct |
103 ms |
20824 KB |
Output is correct |
92 |
Correct |
108 ms |
19400 KB |
Output is correct |
93 |
Correct |
109 ms |
20308 KB |
Output is correct |
94 |
Correct |
61 ms |
19792 KB |
Output is correct |
95 |
Correct |
80 ms |
20304 KB |
Output is correct |
96 |
Correct |
92 ms |
20816 KB |
Output is correct |
97 |
Correct |
86 ms |
20816 KB |
Output is correct |
98 |
Correct |
40 ms |
20348 KB |
Output is correct |
99 |
Correct |
47 ms |
21152 KB |
Output is correct |
100 |
Correct |
140 ms |
21096 KB |
Output is correct |
101 |
Correct |
149 ms |
21332 KB |
Output is correct |
102 |
Correct |
149 ms |
21488 KB |
Output is correct |
103 |
Correct |
115 ms |
20428 KB |
Output is correct |
104 |
Correct |
124 ms |
21064 KB |
Output is correct |
105 |
Correct |
153 ms |
21548 KB |
Output is correct |
106 |
Correct |
96 ms |
19652 KB |
Output is correct |
107 |
Correct |
109 ms |
19468 KB |
Output is correct |
108 |
Correct |
129 ms |
20420 KB |
Output is correct |
109 |
Correct |
92 ms |
19960 KB |
Output is correct |
110 |
Correct |
130 ms |
20820 KB |
Output is correct |
111 |
Correct |
148 ms |
20808 KB |
Output is correct |
112 |
Correct |
123 ms |
21064 KB |
Output is correct |
113 |
Correct |
117 ms |
21344 KB |
Output is correct |
114 |
Correct |
85 ms |
21064 KB |
Output is correct |
115 |
Correct |
104 ms |
21576 KB |
Output is correct |
116 |
Correct |
67 ms |
20096 KB |
Output is correct |
117 |
Correct |
104 ms |
21320 KB |
Output is correct |
118 |
Correct |
85 ms |
20552 KB |
Output is correct |
119 |
Correct |
81 ms |
20320 KB |
Output is correct |
120 |
Correct |
103 ms |
21520 KB |
Output is correct |
121 |
Correct |
96 ms |
21396 KB |
Output is correct |
122 |
Correct |
102 ms |
21340 KB |
Output is correct |
123 |
Correct |
103 ms |
21484 KB |
Output is correct |
124 |
Correct |
98 ms |
21320 KB |
Output is correct |
125 |
Correct |
84 ms |
20808 KB |
Output is correct |
126 |
Correct |
100 ms |
19904 KB |
Output is correct |
127 |
Correct |
101 ms |
20048 KB |
Output is correct |
128 |
Correct |
125 ms |
20808 KB |
Output is correct |
129 |
Correct |
89 ms |
21384 KB |
Output is correct |
130 |
Correct |
574 ms |
41828 KB |
Output is correct |
131 |
Correct |
394 ms |
37272 KB |
Output is correct |
132 |
Correct |
581 ms |
41804 KB |
Output is correct |
133 |
Correct |
488 ms |
41504 KB |
Output is correct |
134 |
Correct |
411 ms |
39832 KB |
Output is correct |
135 |
Correct |
465 ms |
42236 KB |
Output is correct |
136 |
Correct |
707 ms |
42352 KB |
Output is correct |
137 |
Correct |
744 ms |
42312 KB |
Output is correct |
138 |
Correct |
490 ms |
41512 KB |
Output is correct |
139 |
Correct |
478 ms |
42056 KB |
Output is correct |
140 |
Correct |
487 ms |
41544 KB |
Output is correct |
141 |
Correct |
510 ms |
41804 KB |
Output is correct |
142 |
Correct |
495 ms |
41888 KB |
Output is correct |
143 |
Correct |
592 ms |
41800 KB |
Output is correct |
144 |
Correct |
598 ms |
41640 KB |
Output is correct |
145 |
Correct |
609 ms |
41800 KB |
Output is correct |
146 |
Correct |
594 ms |
41764 KB |
Output is correct |
147 |
Correct |
607 ms |
41884 KB |
Output is correct |
148 |
Correct |
599 ms |
41800 KB |
Output is correct |
149 |
Correct |
555 ms |
41800 KB |
Output is correct |
150 |
Correct |
448 ms |
36792 KB |
Output is correct |
151 |
Correct |
511 ms |
39776 KB |
Output is correct |
152 |
Correct |
501 ms |
39904 KB |
Output is correct |
153 |
Correct |
377 ms |
41368 KB |
Output is correct |