#include <bits/stdc++.h>
#define PB push_back
#define ST first
#define ND second
//#pragma GCC optimize ("O3")
//#pragma GCC target("tune=native")
//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
using namespace std;
using ll = long long;
using pi = pair<int, int>;
using vi = vector<int>;
struct Node {
ll f, g, ignore;
};
const int nax = 250 * 1000 + 10;
const ll INF = 1e18;
int n, m, q;
Node T[(1<<19)];
ll T2[(1<<19)];
vi ids[nax];
int R;
void prop(int v) {
T[2*v].f = max(T[2*v].f, T[v].f - T[2*v].g);
T[2*v+1].f = max(T[2*v+1].f, T[v].f - T[2*v+1].g);
T[2*v].g += T[v].g;
T[2*v+1].g += T[v].g;
T[2*v].ignore += T[v].ignore;
T[2*v+1].ignore += T[v].ignore;
T[v].ignore = 0;
T[v].g = 0;
T[v].f = -INF;
}
void add(int a, ll x) {
a += R;
T2[a] += x;
while(a > 1) {
a /= 2;
T2[a] += x;
}
}
void upd(int a, int b, ll x, int l, int r, int v) {
if(a <= l && r <= b) {
T[v].g += x;
if(x > 0) {
T[v].ignore += x;
}
T[v].f = max(T[v].f, -T[v].g);
return;
}
prop(v);
int mid = (l + r) / 2;
if(a <= mid) upd(a,b,x,l,mid,v*2);
if(mid < b) upd(a,b,x,mid+1,r,v*2+1);
}
pair<ll,ll> qr(int a, int l, int r, int v) {
if(l == r) {
return make_pair(T[v].f + T[v].g, T[v].ignore);
}
prop(v);
int mid = (l + r) / 2;
if(a <= mid) return qr(a, l, mid, v * 2);
else return qr(a, mid + 1, r, v * 2 + 1);
}
void init(int l, int r, int v) {
T[v].f = T[v].g = T[v].ignore = 0;
if(l == r) {
return;
}
int mid = (l + r) / 2;
init(l,mid,v*2);
init(mid+1,r,v*2+1);
}
int fp(ll x) {
int v = 1;
while(v < R) {
if(T2[2*v] >= x) {
v = v * 2;
} else {
x -= T2[2*v];
v = v * 2 + 1;
}
}
return v - R;
}
ll absOrd[nax];
vi events[nax];
int ans[nax];
pair<ll,int>delta[nax];
vi qrs;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n >> m >> q;
for(int i = 1; i <= q; ++i) {
int type;
cin >> type;
if(type == 1) {
int l,r,c;
ll k;
cin >> l >> r >> c >> k;
upd(l, r, k, 1, n, 1);
events[l].PB(i);
events[r + 1].PB(-i);
delta[i] = {k, c};
} else if(type == 2) {
int l,r;
ll k;
cin >> l >> r >> k;
upd(l, r, -k, 1, n, 1);
} else {
int a;
ll b;
cin >> a >> b;
qrs.PB(i);
auto [x, y] = qr(a, 1, n, 1);
if(x < b) {
ans[i] = 0;
} else {
ids[a].PB(i);
absOrd[i] = y - (x - b);
}
}
}
R = 1;
while(R <= q) {
R *= 2;
}
for(int i = 1; i <= n; ++i) {
for(int id : events[i]) {
if(id > 0) {
add(id, delta[id].ST);
} else {
add(-id, -delta[-id].ST);
}
}
for(int id : ids[i]) {
ans[id] = delta[fp(absOrd[id])].ND;
}
}
for(int x : qrs) {
cout << ans[x] << "\n";
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
12236 KB |
Output is correct |
2 |
Correct |
9 ms |
12320 KB |
Output is correct |
3 |
Correct |
9 ms |
12220 KB |
Output is correct |
4 |
Correct |
9 ms |
12364 KB |
Output is correct |
5 |
Correct |
8 ms |
12108 KB |
Output is correct |
6 |
Correct |
9 ms |
12120 KB |
Output is correct |
7 |
Correct |
11 ms |
12280 KB |
Output is correct |
8 |
Correct |
9 ms |
12340 KB |
Output is correct |
9 |
Correct |
9 ms |
12236 KB |
Output is correct |
10 |
Correct |
9 ms |
12236 KB |
Output is correct |
11 |
Correct |
9 ms |
12236 KB |
Output is correct |
12 |
Correct |
9 ms |
12236 KB |
Output is correct |
13 |
Correct |
8 ms |
12196 KB |
Output is correct |
14 |
Correct |
9 ms |
12252 KB |
Output is correct |
15 |
Correct |
8 ms |
12236 KB |
Output is correct |
16 |
Correct |
9 ms |
12236 KB |
Output is correct |
17 |
Correct |
10 ms |
12244 KB |
Output is correct |
18 |
Correct |
10 ms |
12340 KB |
Output is correct |
19 |
Correct |
10 ms |
12364 KB |
Output is correct |
20 |
Correct |
11 ms |
12376 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
12236 KB |
Output is correct |
2 |
Correct |
9 ms |
12320 KB |
Output is correct |
3 |
Correct |
9 ms |
12220 KB |
Output is correct |
4 |
Correct |
9 ms |
12364 KB |
Output is correct |
5 |
Correct |
8 ms |
12108 KB |
Output is correct |
6 |
Correct |
9 ms |
12120 KB |
Output is correct |
7 |
Correct |
11 ms |
12280 KB |
Output is correct |
8 |
Correct |
9 ms |
12340 KB |
Output is correct |
9 |
Correct |
9 ms |
12236 KB |
Output is correct |
10 |
Correct |
9 ms |
12236 KB |
Output is correct |
11 |
Correct |
9 ms |
12236 KB |
Output is correct |
12 |
Correct |
9 ms |
12236 KB |
Output is correct |
13 |
Correct |
8 ms |
12196 KB |
Output is correct |
14 |
Correct |
9 ms |
12252 KB |
Output is correct |
15 |
Correct |
8 ms |
12236 KB |
Output is correct |
16 |
Correct |
9 ms |
12236 KB |
Output is correct |
17 |
Correct |
10 ms |
12244 KB |
Output is correct |
18 |
Correct |
10 ms |
12340 KB |
Output is correct |
19 |
Correct |
10 ms |
12364 KB |
Output is correct |
20 |
Correct |
11 ms |
12376 KB |
Output is correct |
21 |
Correct |
9 ms |
12352 KB |
Output is correct |
22 |
Correct |
9 ms |
12364 KB |
Output is correct |
23 |
Correct |
10 ms |
12276 KB |
Output is correct |
24 |
Correct |
10 ms |
12364 KB |
Output is correct |
25 |
Correct |
9 ms |
12176 KB |
Output is correct |
26 |
Correct |
9 ms |
12108 KB |
Output is correct |
27 |
Correct |
9 ms |
12236 KB |
Output is correct |
28 |
Correct |
10 ms |
12344 KB |
Output is correct |
29 |
Correct |
10 ms |
12348 KB |
Output is correct |
30 |
Correct |
11 ms |
12344 KB |
Output is correct |
31 |
Correct |
10 ms |
12360 KB |
Output is correct |
32 |
Correct |
10 ms |
12364 KB |
Output is correct |
33 |
Correct |
8 ms |
12236 KB |
Output is correct |
34 |
Correct |
10 ms |
12284 KB |
Output is correct |
35 |
Correct |
9 ms |
12236 KB |
Output is correct |
36 |
Correct |
9 ms |
12340 KB |
Output is correct |
37 |
Correct |
8 ms |
12236 KB |
Output is correct |
38 |
Correct |
9 ms |
12364 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
74 ms |
19788 KB |
Output is correct |
2 |
Correct |
78 ms |
20032 KB |
Output is correct |
3 |
Correct |
71 ms |
19744 KB |
Output is correct |
4 |
Correct |
73 ms |
19780 KB |
Output is correct |
5 |
Correct |
86 ms |
20164 KB |
Output is correct |
6 |
Correct |
76 ms |
20052 KB |
Output is correct |
7 |
Correct |
34 ms |
15864 KB |
Output is correct |
8 |
Correct |
33 ms |
15928 KB |
Output is correct |
9 |
Correct |
73 ms |
19320 KB |
Output is correct |
10 |
Correct |
80 ms |
19868 KB |
Output is correct |
11 |
Correct |
82 ms |
19748 KB |
Output is correct |
12 |
Correct |
74 ms |
19880 KB |
Output is correct |
13 |
Correct |
75 ms |
19872 KB |
Output is correct |
14 |
Correct |
77 ms |
20544 KB |
Output is correct |
15 |
Correct |
84 ms |
20508 KB |
Output is correct |
16 |
Correct |
106 ms |
20804 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
390 ms |
44956 KB |
Output is correct |
2 |
Correct |
332 ms |
40948 KB |
Output is correct |
3 |
Correct |
428 ms |
46876 KB |
Output is correct |
4 |
Correct |
389 ms |
41684 KB |
Output is correct |
5 |
Correct |
343 ms |
41588 KB |
Output is correct |
6 |
Correct |
473 ms |
47620 KB |
Output is correct |
7 |
Correct |
124 ms |
28572 KB |
Output is correct |
8 |
Correct |
124 ms |
28328 KB |
Output is correct |
9 |
Correct |
481 ms |
48800 KB |
Output is correct |
10 |
Correct |
482 ms |
48896 KB |
Output is correct |
11 |
Correct |
471 ms |
42940 KB |
Output is correct |
12 |
Correct |
444 ms |
46852 KB |
Output is correct |
13 |
Correct |
430 ms |
43072 KB |
Output is correct |
14 |
Correct |
441 ms |
46684 KB |
Output is correct |
15 |
Correct |
446 ms |
46644 KB |
Output is correct |
16 |
Correct |
488 ms |
46804 KB |
Output is correct |
17 |
Correct |
458 ms |
46656 KB |
Output is correct |
18 |
Correct |
453 ms |
44796 KB |
Output is correct |
19 |
Correct |
449 ms |
46784 KB |
Output is correct |
20 |
Correct |
483 ms |
45120 KB |
Output is correct |
21 |
Correct |
477 ms |
46720 KB |
Output is correct |
22 |
Correct |
453 ms |
46696 KB |
Output is correct |
23 |
Correct |
452 ms |
46688 KB |
Output is correct |
24 |
Correct |
436 ms |
46656 KB |
Output is correct |
25 |
Correct |
352 ms |
43708 KB |
Output is correct |
26 |
Correct |
341 ms |
44088 KB |
Output is correct |
27 |
Correct |
389 ms |
45560 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
12236 KB |
Output is correct |
2 |
Correct |
9 ms |
12320 KB |
Output is correct |
3 |
Correct |
9 ms |
12220 KB |
Output is correct |
4 |
Correct |
9 ms |
12364 KB |
Output is correct |
5 |
Correct |
8 ms |
12108 KB |
Output is correct |
6 |
Correct |
9 ms |
12120 KB |
Output is correct |
7 |
Correct |
11 ms |
12280 KB |
Output is correct |
8 |
Correct |
9 ms |
12340 KB |
Output is correct |
9 |
Correct |
9 ms |
12236 KB |
Output is correct |
10 |
Correct |
9 ms |
12236 KB |
Output is correct |
11 |
Correct |
9 ms |
12236 KB |
Output is correct |
12 |
Correct |
9 ms |
12236 KB |
Output is correct |
13 |
Correct |
8 ms |
12196 KB |
Output is correct |
14 |
Correct |
9 ms |
12252 KB |
Output is correct |
15 |
Correct |
8 ms |
12236 KB |
Output is correct |
16 |
Correct |
9 ms |
12236 KB |
Output is correct |
17 |
Correct |
10 ms |
12244 KB |
Output is correct |
18 |
Correct |
10 ms |
12340 KB |
Output is correct |
19 |
Correct |
10 ms |
12364 KB |
Output is correct |
20 |
Correct |
11 ms |
12376 KB |
Output is correct |
21 |
Correct |
74 ms |
19788 KB |
Output is correct |
22 |
Correct |
78 ms |
20032 KB |
Output is correct |
23 |
Correct |
71 ms |
19744 KB |
Output is correct |
24 |
Correct |
73 ms |
19780 KB |
Output is correct |
25 |
Correct |
86 ms |
20164 KB |
Output is correct |
26 |
Correct |
76 ms |
20052 KB |
Output is correct |
27 |
Correct |
34 ms |
15864 KB |
Output is correct |
28 |
Correct |
33 ms |
15928 KB |
Output is correct |
29 |
Correct |
73 ms |
19320 KB |
Output is correct |
30 |
Correct |
80 ms |
19868 KB |
Output is correct |
31 |
Correct |
82 ms |
19748 KB |
Output is correct |
32 |
Correct |
74 ms |
19880 KB |
Output is correct |
33 |
Correct |
75 ms |
19872 KB |
Output is correct |
34 |
Correct |
77 ms |
20544 KB |
Output is correct |
35 |
Correct |
84 ms |
20508 KB |
Output is correct |
36 |
Correct |
106 ms |
20804 KB |
Output is correct |
37 |
Correct |
79 ms |
19908 KB |
Output is correct |
38 |
Correct |
77 ms |
19648 KB |
Output is correct |
39 |
Correct |
29 ms |
15392 KB |
Output is correct |
40 |
Correct |
32 ms |
15812 KB |
Output is correct |
41 |
Correct |
89 ms |
19500 KB |
Output is correct |
42 |
Correct |
86 ms |
20476 KB |
Output is correct |
43 |
Correct |
99 ms |
20420 KB |
Output is correct |
44 |
Correct |
98 ms |
19976 KB |
Output is correct |
45 |
Correct |
93 ms |
20424 KB |
Output is correct |
46 |
Correct |
109 ms |
20456 KB |
Output is correct |
47 |
Correct |
49 ms |
19732 KB |
Output is correct |
48 |
Correct |
80 ms |
19892 KB |
Output is correct |
49 |
Correct |
73 ms |
18940 KB |
Output is correct |
50 |
Correct |
77 ms |
19692 KB |
Output is correct |
51 |
Correct |
93 ms |
20432 KB |
Output is correct |
52 |
Correct |
96 ms |
20420 KB |
Output is correct |
53 |
Correct |
68 ms |
19764 KB |
Output is correct |
54 |
Correct |
88 ms |
21036 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
90 ms |
21096 KB |
Output is correct |
2 |
Correct |
106 ms |
21556 KB |
Output is correct |
3 |
Correct |
108 ms |
21720 KB |
Output is correct |
4 |
Correct |
71 ms |
19908 KB |
Output is correct |
5 |
Correct |
93 ms |
20992 KB |
Output is correct |
6 |
Correct |
95 ms |
21700 KB |
Output is correct |
7 |
Correct |
38 ms |
16452 KB |
Output is correct |
8 |
Correct |
35 ms |
16176 KB |
Output is correct |
9 |
Correct |
58 ms |
20652 KB |
Output is correct |
10 |
Correct |
59 ms |
19076 KB |
Output is correct |
11 |
Correct |
84 ms |
20804 KB |
Output is correct |
12 |
Correct |
81 ms |
20780 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
12236 KB |
Output is correct |
2 |
Correct |
9 ms |
12320 KB |
Output is correct |
3 |
Correct |
9 ms |
12220 KB |
Output is correct |
4 |
Correct |
9 ms |
12364 KB |
Output is correct |
5 |
Correct |
8 ms |
12108 KB |
Output is correct |
6 |
Correct |
9 ms |
12120 KB |
Output is correct |
7 |
Correct |
11 ms |
12280 KB |
Output is correct |
8 |
Correct |
9 ms |
12340 KB |
Output is correct |
9 |
Correct |
9 ms |
12236 KB |
Output is correct |
10 |
Correct |
9 ms |
12236 KB |
Output is correct |
11 |
Correct |
9 ms |
12236 KB |
Output is correct |
12 |
Correct |
9 ms |
12236 KB |
Output is correct |
13 |
Correct |
8 ms |
12196 KB |
Output is correct |
14 |
Correct |
9 ms |
12252 KB |
Output is correct |
15 |
Correct |
8 ms |
12236 KB |
Output is correct |
16 |
Correct |
9 ms |
12236 KB |
Output is correct |
17 |
Correct |
10 ms |
12244 KB |
Output is correct |
18 |
Correct |
10 ms |
12340 KB |
Output is correct |
19 |
Correct |
10 ms |
12364 KB |
Output is correct |
20 |
Correct |
11 ms |
12376 KB |
Output is correct |
21 |
Correct |
9 ms |
12352 KB |
Output is correct |
22 |
Correct |
9 ms |
12364 KB |
Output is correct |
23 |
Correct |
10 ms |
12276 KB |
Output is correct |
24 |
Correct |
10 ms |
12364 KB |
Output is correct |
25 |
Correct |
9 ms |
12176 KB |
Output is correct |
26 |
Correct |
9 ms |
12108 KB |
Output is correct |
27 |
Correct |
9 ms |
12236 KB |
Output is correct |
28 |
Correct |
10 ms |
12344 KB |
Output is correct |
29 |
Correct |
10 ms |
12348 KB |
Output is correct |
30 |
Correct |
11 ms |
12344 KB |
Output is correct |
31 |
Correct |
10 ms |
12360 KB |
Output is correct |
32 |
Correct |
10 ms |
12364 KB |
Output is correct |
33 |
Correct |
8 ms |
12236 KB |
Output is correct |
34 |
Correct |
10 ms |
12284 KB |
Output is correct |
35 |
Correct |
9 ms |
12236 KB |
Output is correct |
36 |
Correct |
9 ms |
12340 KB |
Output is correct |
37 |
Correct |
8 ms |
12236 KB |
Output is correct |
38 |
Correct |
9 ms |
12364 KB |
Output is correct |
39 |
Correct |
74 ms |
19788 KB |
Output is correct |
40 |
Correct |
78 ms |
20032 KB |
Output is correct |
41 |
Correct |
71 ms |
19744 KB |
Output is correct |
42 |
Correct |
73 ms |
19780 KB |
Output is correct |
43 |
Correct |
86 ms |
20164 KB |
Output is correct |
44 |
Correct |
76 ms |
20052 KB |
Output is correct |
45 |
Correct |
34 ms |
15864 KB |
Output is correct |
46 |
Correct |
33 ms |
15928 KB |
Output is correct |
47 |
Correct |
73 ms |
19320 KB |
Output is correct |
48 |
Correct |
80 ms |
19868 KB |
Output is correct |
49 |
Correct |
82 ms |
19748 KB |
Output is correct |
50 |
Correct |
74 ms |
19880 KB |
Output is correct |
51 |
Correct |
75 ms |
19872 KB |
Output is correct |
52 |
Correct |
77 ms |
20544 KB |
Output is correct |
53 |
Correct |
84 ms |
20508 KB |
Output is correct |
54 |
Correct |
106 ms |
20804 KB |
Output is correct |
55 |
Correct |
79 ms |
19908 KB |
Output is correct |
56 |
Correct |
77 ms |
19648 KB |
Output is correct |
57 |
Correct |
29 ms |
15392 KB |
Output is correct |
58 |
Correct |
32 ms |
15812 KB |
Output is correct |
59 |
Correct |
89 ms |
19500 KB |
Output is correct |
60 |
Correct |
86 ms |
20476 KB |
Output is correct |
61 |
Correct |
99 ms |
20420 KB |
Output is correct |
62 |
Correct |
98 ms |
19976 KB |
Output is correct |
63 |
Correct |
93 ms |
20424 KB |
Output is correct |
64 |
Correct |
109 ms |
20456 KB |
Output is correct |
65 |
Correct |
49 ms |
19732 KB |
Output is correct |
66 |
Correct |
80 ms |
19892 KB |
Output is correct |
67 |
Correct |
73 ms |
18940 KB |
Output is correct |
68 |
Correct |
77 ms |
19692 KB |
Output is correct |
69 |
Correct |
93 ms |
20432 KB |
Output is correct |
70 |
Correct |
96 ms |
20420 KB |
Output is correct |
71 |
Correct |
68 ms |
19764 KB |
Output is correct |
72 |
Correct |
88 ms |
21036 KB |
Output is correct |
73 |
Correct |
90 ms |
21096 KB |
Output is correct |
74 |
Correct |
106 ms |
21556 KB |
Output is correct |
75 |
Correct |
108 ms |
21720 KB |
Output is correct |
76 |
Correct |
71 ms |
19908 KB |
Output is correct |
77 |
Correct |
93 ms |
20992 KB |
Output is correct |
78 |
Correct |
95 ms |
21700 KB |
Output is correct |
79 |
Correct |
38 ms |
16452 KB |
Output is correct |
80 |
Correct |
35 ms |
16176 KB |
Output is correct |
81 |
Correct |
58 ms |
20652 KB |
Output is correct |
82 |
Correct |
59 ms |
19076 KB |
Output is correct |
83 |
Correct |
84 ms |
20804 KB |
Output is correct |
84 |
Correct |
81 ms |
20780 KB |
Output is correct |
85 |
Correct |
81 ms |
20464 KB |
Output is correct |
86 |
Correct |
90 ms |
21088 KB |
Output is correct |
87 |
Correct |
93 ms |
20516 KB |
Output is correct |
88 |
Correct |
96 ms |
21308 KB |
Output is correct |
89 |
Correct |
68 ms |
18444 KB |
Output is correct |
90 |
Correct |
94 ms |
21060 KB |
Output is correct |
91 |
Correct |
72 ms |
19924 KB |
Output is correct |
92 |
Correct |
74 ms |
19648 KB |
Output is correct |
93 |
Correct |
98 ms |
21140 KB |
Output is correct |
94 |
Correct |
95 ms |
20548 KB |
Output is correct |
95 |
Correct |
98 ms |
20836 KB |
Output is correct |
96 |
Correct |
92 ms |
20996 KB |
Output is correct |
97 |
Correct |
99 ms |
20932 KB |
Output is correct |
98 |
Correct |
82 ms |
20120 KB |
Output is correct |
99 |
Correct |
53 ms |
20168 KB |
Output is correct |
100 |
Correct |
70 ms |
19500 KB |
Output is correct |
101 |
Correct |
81 ms |
20308 KB |
Output is correct |
102 |
Correct |
78 ms |
20784 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
12236 KB |
Output is correct |
2 |
Correct |
9 ms |
12320 KB |
Output is correct |
3 |
Correct |
9 ms |
12220 KB |
Output is correct |
4 |
Correct |
9 ms |
12364 KB |
Output is correct |
5 |
Correct |
8 ms |
12108 KB |
Output is correct |
6 |
Correct |
9 ms |
12120 KB |
Output is correct |
7 |
Correct |
11 ms |
12280 KB |
Output is correct |
8 |
Correct |
9 ms |
12340 KB |
Output is correct |
9 |
Correct |
9 ms |
12236 KB |
Output is correct |
10 |
Correct |
9 ms |
12236 KB |
Output is correct |
11 |
Correct |
9 ms |
12236 KB |
Output is correct |
12 |
Correct |
9 ms |
12236 KB |
Output is correct |
13 |
Correct |
8 ms |
12196 KB |
Output is correct |
14 |
Correct |
9 ms |
12252 KB |
Output is correct |
15 |
Correct |
8 ms |
12236 KB |
Output is correct |
16 |
Correct |
9 ms |
12236 KB |
Output is correct |
17 |
Correct |
10 ms |
12244 KB |
Output is correct |
18 |
Correct |
10 ms |
12340 KB |
Output is correct |
19 |
Correct |
10 ms |
12364 KB |
Output is correct |
20 |
Correct |
11 ms |
12376 KB |
Output is correct |
21 |
Correct |
9 ms |
12352 KB |
Output is correct |
22 |
Correct |
9 ms |
12364 KB |
Output is correct |
23 |
Correct |
10 ms |
12276 KB |
Output is correct |
24 |
Correct |
10 ms |
12364 KB |
Output is correct |
25 |
Correct |
9 ms |
12176 KB |
Output is correct |
26 |
Correct |
9 ms |
12108 KB |
Output is correct |
27 |
Correct |
9 ms |
12236 KB |
Output is correct |
28 |
Correct |
10 ms |
12344 KB |
Output is correct |
29 |
Correct |
10 ms |
12348 KB |
Output is correct |
30 |
Correct |
11 ms |
12344 KB |
Output is correct |
31 |
Correct |
10 ms |
12360 KB |
Output is correct |
32 |
Correct |
10 ms |
12364 KB |
Output is correct |
33 |
Correct |
8 ms |
12236 KB |
Output is correct |
34 |
Correct |
10 ms |
12284 KB |
Output is correct |
35 |
Correct |
9 ms |
12236 KB |
Output is correct |
36 |
Correct |
9 ms |
12340 KB |
Output is correct |
37 |
Correct |
8 ms |
12236 KB |
Output is correct |
38 |
Correct |
9 ms |
12364 KB |
Output is correct |
39 |
Correct |
74 ms |
19788 KB |
Output is correct |
40 |
Correct |
78 ms |
20032 KB |
Output is correct |
41 |
Correct |
71 ms |
19744 KB |
Output is correct |
42 |
Correct |
73 ms |
19780 KB |
Output is correct |
43 |
Correct |
86 ms |
20164 KB |
Output is correct |
44 |
Correct |
76 ms |
20052 KB |
Output is correct |
45 |
Correct |
34 ms |
15864 KB |
Output is correct |
46 |
Correct |
33 ms |
15928 KB |
Output is correct |
47 |
Correct |
73 ms |
19320 KB |
Output is correct |
48 |
Correct |
80 ms |
19868 KB |
Output is correct |
49 |
Correct |
82 ms |
19748 KB |
Output is correct |
50 |
Correct |
74 ms |
19880 KB |
Output is correct |
51 |
Correct |
75 ms |
19872 KB |
Output is correct |
52 |
Correct |
77 ms |
20544 KB |
Output is correct |
53 |
Correct |
84 ms |
20508 KB |
Output is correct |
54 |
Correct |
106 ms |
20804 KB |
Output is correct |
55 |
Correct |
390 ms |
44956 KB |
Output is correct |
56 |
Correct |
332 ms |
40948 KB |
Output is correct |
57 |
Correct |
428 ms |
46876 KB |
Output is correct |
58 |
Correct |
389 ms |
41684 KB |
Output is correct |
59 |
Correct |
343 ms |
41588 KB |
Output is correct |
60 |
Correct |
473 ms |
47620 KB |
Output is correct |
61 |
Correct |
124 ms |
28572 KB |
Output is correct |
62 |
Correct |
124 ms |
28328 KB |
Output is correct |
63 |
Correct |
481 ms |
48800 KB |
Output is correct |
64 |
Correct |
482 ms |
48896 KB |
Output is correct |
65 |
Correct |
471 ms |
42940 KB |
Output is correct |
66 |
Correct |
444 ms |
46852 KB |
Output is correct |
67 |
Correct |
430 ms |
43072 KB |
Output is correct |
68 |
Correct |
441 ms |
46684 KB |
Output is correct |
69 |
Correct |
446 ms |
46644 KB |
Output is correct |
70 |
Correct |
488 ms |
46804 KB |
Output is correct |
71 |
Correct |
458 ms |
46656 KB |
Output is correct |
72 |
Correct |
453 ms |
44796 KB |
Output is correct |
73 |
Correct |
449 ms |
46784 KB |
Output is correct |
74 |
Correct |
483 ms |
45120 KB |
Output is correct |
75 |
Correct |
477 ms |
46720 KB |
Output is correct |
76 |
Correct |
453 ms |
46696 KB |
Output is correct |
77 |
Correct |
452 ms |
46688 KB |
Output is correct |
78 |
Correct |
436 ms |
46656 KB |
Output is correct |
79 |
Correct |
352 ms |
43708 KB |
Output is correct |
80 |
Correct |
341 ms |
44088 KB |
Output is correct |
81 |
Correct |
389 ms |
45560 KB |
Output is correct |
82 |
Correct |
79 ms |
19908 KB |
Output is correct |
83 |
Correct |
77 ms |
19648 KB |
Output is correct |
84 |
Correct |
29 ms |
15392 KB |
Output is correct |
85 |
Correct |
32 ms |
15812 KB |
Output is correct |
86 |
Correct |
89 ms |
19500 KB |
Output is correct |
87 |
Correct |
86 ms |
20476 KB |
Output is correct |
88 |
Correct |
99 ms |
20420 KB |
Output is correct |
89 |
Correct |
98 ms |
19976 KB |
Output is correct |
90 |
Correct |
93 ms |
20424 KB |
Output is correct |
91 |
Correct |
109 ms |
20456 KB |
Output is correct |
92 |
Correct |
49 ms |
19732 KB |
Output is correct |
93 |
Correct |
80 ms |
19892 KB |
Output is correct |
94 |
Correct |
73 ms |
18940 KB |
Output is correct |
95 |
Correct |
77 ms |
19692 KB |
Output is correct |
96 |
Correct |
93 ms |
20432 KB |
Output is correct |
97 |
Correct |
96 ms |
20420 KB |
Output is correct |
98 |
Correct |
68 ms |
19764 KB |
Output is correct |
99 |
Correct |
88 ms |
21036 KB |
Output is correct |
100 |
Correct |
90 ms |
21096 KB |
Output is correct |
101 |
Correct |
106 ms |
21556 KB |
Output is correct |
102 |
Correct |
108 ms |
21720 KB |
Output is correct |
103 |
Correct |
71 ms |
19908 KB |
Output is correct |
104 |
Correct |
93 ms |
20992 KB |
Output is correct |
105 |
Correct |
95 ms |
21700 KB |
Output is correct |
106 |
Correct |
38 ms |
16452 KB |
Output is correct |
107 |
Correct |
35 ms |
16176 KB |
Output is correct |
108 |
Correct |
58 ms |
20652 KB |
Output is correct |
109 |
Correct |
59 ms |
19076 KB |
Output is correct |
110 |
Correct |
84 ms |
20804 KB |
Output is correct |
111 |
Correct |
81 ms |
20780 KB |
Output is correct |
112 |
Correct |
81 ms |
20464 KB |
Output is correct |
113 |
Correct |
90 ms |
21088 KB |
Output is correct |
114 |
Correct |
93 ms |
20516 KB |
Output is correct |
115 |
Correct |
96 ms |
21308 KB |
Output is correct |
116 |
Correct |
68 ms |
18444 KB |
Output is correct |
117 |
Correct |
94 ms |
21060 KB |
Output is correct |
118 |
Correct |
72 ms |
19924 KB |
Output is correct |
119 |
Correct |
74 ms |
19648 KB |
Output is correct |
120 |
Correct |
98 ms |
21140 KB |
Output is correct |
121 |
Correct |
95 ms |
20548 KB |
Output is correct |
122 |
Correct |
98 ms |
20836 KB |
Output is correct |
123 |
Correct |
92 ms |
20996 KB |
Output is correct |
124 |
Correct |
99 ms |
20932 KB |
Output is correct |
125 |
Correct |
82 ms |
20120 KB |
Output is correct |
126 |
Correct |
53 ms |
20168 KB |
Output is correct |
127 |
Correct |
70 ms |
19500 KB |
Output is correct |
128 |
Correct |
81 ms |
20308 KB |
Output is correct |
129 |
Correct |
78 ms |
20784 KB |
Output is correct |
130 |
Correct |
450 ms |
47560 KB |
Output is correct |
131 |
Correct |
332 ms |
41204 KB |
Output is correct |
132 |
Correct |
440 ms |
47508 KB |
Output is correct |
133 |
Correct |
467 ms |
47428 KB |
Output is correct |
134 |
Correct |
403 ms |
44936 KB |
Output is correct |
135 |
Correct |
496 ms |
48544 KB |
Output is correct |
136 |
Correct |
481 ms |
49888 KB |
Output is correct |
137 |
Correct |
504 ms |
49768 KB |
Output is correct |
138 |
Correct |
445 ms |
43548 KB |
Output is correct |
139 |
Correct |
448 ms |
47400 KB |
Output is correct |
140 |
Correct |
445 ms |
44100 KB |
Output is correct |
141 |
Correct |
459 ms |
47360 KB |
Output is correct |
142 |
Correct |
446 ms |
47340 KB |
Output is correct |
143 |
Correct |
460 ms |
47296 KB |
Output is correct |
144 |
Correct |
438 ms |
45376 KB |
Output is correct |
145 |
Correct |
516 ms |
47428 KB |
Output is correct |
146 |
Correct |
433 ms |
46012 KB |
Output is correct |
147 |
Correct |
453 ms |
47360 KB |
Output is correct |
148 |
Correct |
466 ms |
47296 KB |
Output is correct |
149 |
Correct |
501 ms |
47296 KB |
Output is correct |
150 |
Correct |
210 ms |
43820 KB |
Output is correct |
151 |
Correct |
354 ms |
44636 KB |
Output is correct |
152 |
Correct |
342 ms |
44668 KB |
Output is correct |
153 |
Correct |
338 ms |
46404 KB |
Output is correct |