#include <bits/stdc++.h>
using namespace std;
#define MAXN 262144
#define INF 1000000000000000009ll
struct node{
long long psum = 0, nsum = 0;
pair<long long, int> minsum = {0, -1};
node(){}
};
node tree[2*MAXN];
void build(int v = 1, int tl = 0, int tr = MAXN-1){
tree[v].minsum.second = tl;
if(tl == tr) return;
int tm = (tl+tr)/2;
build(v*2, tl, tm); build(v*2+1, tm+1, tr);
}
void upd(int id, long long val, int v = 1, int tl = 0, int tr = MAXN-1){
if(tl > id || tr < id) return;
if(tl == tr){
if(val > 0) tree[v].psum = val, tree[v].nsum = 0;
else tree[v].nsum = -val, tree[v].psum = 0;
tree[v].minsum.first = val;
return;
}
int tm = (tl+tr)/2;
upd(id, val, v*2, tl, tm); upd(id, val, v*2+1, tm+1, tr);
tree[v].psum = tree[2*v].psum + tree[2*v+1].psum;
tree[v].nsum = tree[2*v].nsum + tree[2*v+1].nsum;
tree[v].minsum = min(tree[2*v].minsum, {tree[2*v+1].minsum.first+tree[2*v].psum-tree[2*v].nsum, tree[v*2+1].minsum.second});
}
pair<long long, int> getminsum(int l, int r, long long cursum = 0, int v = 1, int tl = 0, int tr = MAXN-1){
if(tl > r || tr < l) return {INF, -1};
if(l <= tl && tr <= r) return {tree[v].minsum.first+cursum, tree[v].minsum.second};
int tm = (tl+tr)/2;
return min(getminsum(l, r, cursum, v*2, tl, tm), getminsum(l, r, cursum + tree[v*2].psum - tree[2*v].nsum, v*2+1, tm+1, tr));
}
long long getnsum(int l, int r, int v = 1, int tl = 0, int tr = MAXN-1){
if(tl > r || tr < l) return 0;
if(l <= tl && tr <= r) return tree[v].nsum;
int tm = (tl+tr)/2;
return getnsum(l, r, v*2, tl, tm) + getnsum(l, r, v*2+1, tm+1, tr);
}
long long getpsum(int l, int r, int v = 1, int tl = 0, int tr = MAXN-1){
if(tl > r || tr < l) return 0;
if(l <= tl && tr <= r) return tree[v].psum;
int tm = (tl+tr)/2;
return getpsum(l, r, v*2, tl, tm) + getpsum(l, r, v*2+1, tm+1, tr);
}
int getans(long long k, int v = 1, int tl = 0, int tr = MAXN-1){
if(tl == tr){
if(tree[v].psum >= k) return tl;
return MAXN;
}
int tm = (tl+tr)/2;
if(tree[2*v].psum >= k) return getans(k, v*2, tl, tm);
return getans(k-tree[2*v].psum, v*2+1, tm+1, tr);
}
int n, m, q;
int color[MAXN], ans[MAXN];
vector<pair<long long, int>> ask[MAXN];
vector<pair<long long, int>> add[MAXN];
vector<pair<long long, int>> del[MAXN];
int main(){
// freopen("a.in", "r", stdin);
ios_base::sync_with_stdio(false);
cin.tie(0);
build();
cin >> n >> m >> q;
for(int i = 1; i<=q; i++){
int t; cin >> t;
if(t == 1){
int l, r, c; long long k; cin >> l >> r >> c >> k;
add[l].push_back({k, i});
del[r+1].push_back({k, i});
color[i] = c;
}
else if(t == 2){
int l, r; long long k; cin >> l >> r >> k;
add[l].push_back({-k, i});
del[r+1].push_back({-k, i});
}
else{
int a; long long b; cin >> a >> b;
ask[a].push_back({b, i});
}
}
for(int i = 1; i<=n; i++){
for(auto x : del[i]) upd(x.second, 0);
for(auto x : add[i]) upd(x.second, x.first);
for(auto x : ask[i]){
int l = getminsum(0, x.second).second+1, r = x.second;
long long k = x.first+getpsum(0, l-1)+getnsum(l, r);
// cerr << "hi: " << getpsum(0, 1) << endl;
int res = getans(k);
if(res > x.second) ans[x.second] = -1;
else ans[x.second] = color[res];
}
}
for(int i = 1; i<=q; i++){
if(ans[i] == 0) continue;
cout << (ans[i] == -1?0:ans[i]) << endl;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
35268 KB |
Output is correct |
2 |
Correct |
25 ms |
35224 KB |
Output is correct |
3 |
Correct |
23 ms |
35216 KB |
Output is correct |
4 |
Correct |
28 ms |
35288 KB |
Output is correct |
5 |
Correct |
27 ms |
35276 KB |
Output is correct |
6 |
Correct |
24 ms |
35320 KB |
Output is correct |
7 |
Correct |
24 ms |
35348 KB |
Output is correct |
8 |
Correct |
26 ms |
35404 KB |
Output is correct |
9 |
Correct |
25 ms |
35336 KB |
Output is correct |
10 |
Correct |
24 ms |
35292 KB |
Output is correct |
11 |
Correct |
25 ms |
35276 KB |
Output is correct |
12 |
Correct |
24 ms |
35352 KB |
Output is correct |
13 |
Correct |
23 ms |
35232 KB |
Output is correct |
14 |
Correct |
23 ms |
35276 KB |
Output is correct |
15 |
Correct |
23 ms |
35220 KB |
Output is correct |
16 |
Correct |
24 ms |
35328 KB |
Output is correct |
17 |
Correct |
24 ms |
35280 KB |
Output is correct |
18 |
Correct |
24 ms |
35344 KB |
Output is correct |
19 |
Correct |
25 ms |
35240 KB |
Output is correct |
20 |
Correct |
25 ms |
35276 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
35268 KB |
Output is correct |
2 |
Correct |
25 ms |
35224 KB |
Output is correct |
3 |
Correct |
23 ms |
35216 KB |
Output is correct |
4 |
Correct |
28 ms |
35288 KB |
Output is correct |
5 |
Correct |
27 ms |
35276 KB |
Output is correct |
6 |
Correct |
24 ms |
35320 KB |
Output is correct |
7 |
Correct |
24 ms |
35348 KB |
Output is correct |
8 |
Correct |
26 ms |
35404 KB |
Output is correct |
9 |
Correct |
25 ms |
35336 KB |
Output is correct |
10 |
Correct |
24 ms |
35292 KB |
Output is correct |
11 |
Correct |
25 ms |
35276 KB |
Output is correct |
12 |
Correct |
24 ms |
35352 KB |
Output is correct |
13 |
Correct |
23 ms |
35232 KB |
Output is correct |
14 |
Correct |
23 ms |
35276 KB |
Output is correct |
15 |
Correct |
23 ms |
35220 KB |
Output is correct |
16 |
Correct |
24 ms |
35328 KB |
Output is correct |
17 |
Correct |
24 ms |
35280 KB |
Output is correct |
18 |
Correct |
24 ms |
35344 KB |
Output is correct |
19 |
Correct |
25 ms |
35240 KB |
Output is correct |
20 |
Correct |
25 ms |
35276 KB |
Output is correct |
21 |
Correct |
25 ms |
35276 KB |
Output is correct |
22 |
Correct |
25 ms |
35300 KB |
Output is correct |
23 |
Correct |
24 ms |
35252 KB |
Output is correct |
24 |
Correct |
25 ms |
35276 KB |
Output is correct |
25 |
Correct |
24 ms |
35300 KB |
Output is correct |
26 |
Correct |
23 ms |
35268 KB |
Output is correct |
27 |
Correct |
25 ms |
35340 KB |
Output is correct |
28 |
Correct |
24 ms |
35344 KB |
Output is correct |
29 |
Correct |
24 ms |
35248 KB |
Output is correct |
30 |
Correct |
24 ms |
35348 KB |
Output is correct |
31 |
Correct |
24 ms |
35276 KB |
Output is correct |
32 |
Correct |
26 ms |
35276 KB |
Output is correct |
33 |
Correct |
23 ms |
35276 KB |
Output is correct |
34 |
Correct |
24 ms |
35340 KB |
Output is correct |
35 |
Correct |
24 ms |
35352 KB |
Output is correct |
36 |
Correct |
24 ms |
35344 KB |
Output is correct |
37 |
Correct |
27 ms |
35228 KB |
Output is correct |
38 |
Correct |
24 ms |
35348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
191 ms |
39900 KB |
Output is correct |
2 |
Correct |
156 ms |
40076 KB |
Output is correct |
3 |
Correct |
157 ms |
39860 KB |
Output is correct |
4 |
Correct |
200 ms |
39924 KB |
Output is correct |
5 |
Correct |
159 ms |
40084 KB |
Output is correct |
6 |
Correct |
148 ms |
40084 KB |
Output is correct |
7 |
Correct |
102 ms |
38160 KB |
Output is correct |
8 |
Correct |
100 ms |
38584 KB |
Output is correct |
9 |
Correct |
162 ms |
39884 KB |
Output is correct |
10 |
Correct |
150 ms |
39988 KB |
Output is correct |
11 |
Correct |
178 ms |
40044 KB |
Output is correct |
12 |
Correct |
188 ms |
40096 KB |
Output is correct |
13 |
Correct |
136 ms |
39252 KB |
Output is correct |
14 |
Correct |
175 ms |
39860 KB |
Output is correct |
15 |
Correct |
134 ms |
40004 KB |
Output is correct |
16 |
Correct |
141 ms |
40260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
677 ms |
52980 KB |
Output is correct |
2 |
Correct |
503 ms |
49484 KB |
Output is correct |
3 |
Correct |
706 ms |
54616 KB |
Output is correct |
4 |
Correct |
488 ms |
49860 KB |
Output is correct |
5 |
Correct |
468 ms |
49860 KB |
Output is correct |
6 |
Correct |
660 ms |
55252 KB |
Output is correct |
7 |
Correct |
352 ms |
50016 KB |
Output is correct |
8 |
Correct |
407 ms |
49880 KB |
Output is correct |
9 |
Correct |
740 ms |
53768 KB |
Output is correct |
10 |
Correct |
740 ms |
53780 KB |
Output is correct |
11 |
Correct |
642 ms |
54536 KB |
Output is correct |
12 |
Correct |
649 ms |
55080 KB |
Output is correct |
13 |
Correct |
717 ms |
54608 KB |
Output is correct |
14 |
Correct |
679 ms |
55024 KB |
Output is correct |
15 |
Correct |
672 ms |
54884 KB |
Output is correct |
16 |
Correct |
718 ms |
54848 KB |
Output is correct |
17 |
Correct |
670 ms |
54960 KB |
Output is correct |
18 |
Correct |
656 ms |
54776 KB |
Output is correct |
19 |
Correct |
645 ms |
54924 KB |
Output is correct |
20 |
Correct |
662 ms |
54756 KB |
Output is correct |
21 |
Correct |
686 ms |
55016 KB |
Output is correct |
22 |
Correct |
712 ms |
54972 KB |
Output is correct |
23 |
Correct |
693 ms |
54880 KB |
Output is correct |
24 |
Correct |
677 ms |
54844 KB |
Output is correct |
25 |
Correct |
573 ms |
54056 KB |
Output is correct |
26 |
Correct |
634 ms |
54492 KB |
Output is correct |
27 |
Correct |
531 ms |
55440 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
35268 KB |
Output is correct |
2 |
Correct |
25 ms |
35224 KB |
Output is correct |
3 |
Correct |
23 ms |
35216 KB |
Output is correct |
4 |
Correct |
28 ms |
35288 KB |
Output is correct |
5 |
Correct |
27 ms |
35276 KB |
Output is correct |
6 |
Correct |
24 ms |
35320 KB |
Output is correct |
7 |
Correct |
24 ms |
35348 KB |
Output is correct |
8 |
Correct |
26 ms |
35404 KB |
Output is correct |
9 |
Correct |
25 ms |
35336 KB |
Output is correct |
10 |
Correct |
24 ms |
35292 KB |
Output is correct |
11 |
Correct |
25 ms |
35276 KB |
Output is correct |
12 |
Correct |
24 ms |
35352 KB |
Output is correct |
13 |
Correct |
23 ms |
35232 KB |
Output is correct |
14 |
Correct |
23 ms |
35276 KB |
Output is correct |
15 |
Correct |
23 ms |
35220 KB |
Output is correct |
16 |
Correct |
24 ms |
35328 KB |
Output is correct |
17 |
Correct |
24 ms |
35280 KB |
Output is correct |
18 |
Correct |
24 ms |
35344 KB |
Output is correct |
19 |
Correct |
25 ms |
35240 KB |
Output is correct |
20 |
Correct |
25 ms |
35276 KB |
Output is correct |
21 |
Correct |
191 ms |
39900 KB |
Output is correct |
22 |
Correct |
156 ms |
40076 KB |
Output is correct |
23 |
Correct |
157 ms |
39860 KB |
Output is correct |
24 |
Correct |
200 ms |
39924 KB |
Output is correct |
25 |
Correct |
159 ms |
40084 KB |
Output is correct |
26 |
Correct |
148 ms |
40084 KB |
Output is correct |
27 |
Correct |
102 ms |
38160 KB |
Output is correct |
28 |
Correct |
100 ms |
38584 KB |
Output is correct |
29 |
Correct |
162 ms |
39884 KB |
Output is correct |
30 |
Correct |
150 ms |
39988 KB |
Output is correct |
31 |
Correct |
178 ms |
40044 KB |
Output is correct |
32 |
Correct |
188 ms |
40096 KB |
Output is correct |
33 |
Correct |
136 ms |
39252 KB |
Output is correct |
34 |
Correct |
175 ms |
39860 KB |
Output is correct |
35 |
Correct |
134 ms |
40004 KB |
Output is correct |
36 |
Correct |
141 ms |
40260 KB |
Output is correct |
37 |
Correct |
163 ms |
39244 KB |
Output is correct |
38 |
Correct |
130 ms |
38924 KB |
Output is correct |
39 |
Correct |
86 ms |
38024 KB |
Output is correct |
40 |
Correct |
110 ms |
38524 KB |
Output is correct |
41 |
Correct |
167 ms |
39720 KB |
Output is correct |
42 |
Correct |
154 ms |
39832 KB |
Output is correct |
43 |
Correct |
160 ms |
39888 KB |
Output is correct |
44 |
Correct |
161 ms |
39764 KB |
Output is correct |
45 |
Correct |
159 ms |
39820 KB |
Output is correct |
46 |
Correct |
153 ms |
39816 KB |
Output is correct |
47 |
Correct |
114 ms |
38652 KB |
Output is correct |
48 |
Correct |
143 ms |
39676 KB |
Output is correct |
49 |
Correct |
106 ms |
38504 KB |
Output is correct |
50 |
Correct |
126 ms |
39204 KB |
Output is correct |
51 |
Correct |
151 ms |
39940 KB |
Output is correct |
52 |
Correct |
149 ms |
39912 KB |
Output is correct |
53 |
Correct |
117 ms |
39180 KB |
Output is correct |
54 |
Correct |
142 ms |
40208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
162 ms |
39756 KB |
Output is correct |
2 |
Correct |
182 ms |
40088 KB |
Output is correct |
3 |
Correct |
195 ms |
40136 KB |
Output is correct |
4 |
Correct |
127 ms |
38736 KB |
Output is correct |
5 |
Correct |
154 ms |
39492 KB |
Output is correct |
6 |
Correct |
197 ms |
40200 KB |
Output is correct |
7 |
Correct |
118 ms |
38420 KB |
Output is correct |
8 |
Correct |
118 ms |
38440 KB |
Output is correct |
9 |
Correct |
149 ms |
39312 KB |
Output is correct |
10 |
Correct |
122 ms |
38556 KB |
Output is correct |
11 |
Correct |
191 ms |
39724 KB |
Output is correct |
12 |
Correct |
164 ms |
39752 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
35268 KB |
Output is correct |
2 |
Correct |
25 ms |
35224 KB |
Output is correct |
3 |
Correct |
23 ms |
35216 KB |
Output is correct |
4 |
Correct |
28 ms |
35288 KB |
Output is correct |
5 |
Correct |
27 ms |
35276 KB |
Output is correct |
6 |
Correct |
24 ms |
35320 KB |
Output is correct |
7 |
Correct |
24 ms |
35348 KB |
Output is correct |
8 |
Correct |
26 ms |
35404 KB |
Output is correct |
9 |
Correct |
25 ms |
35336 KB |
Output is correct |
10 |
Correct |
24 ms |
35292 KB |
Output is correct |
11 |
Correct |
25 ms |
35276 KB |
Output is correct |
12 |
Correct |
24 ms |
35352 KB |
Output is correct |
13 |
Correct |
23 ms |
35232 KB |
Output is correct |
14 |
Correct |
23 ms |
35276 KB |
Output is correct |
15 |
Correct |
23 ms |
35220 KB |
Output is correct |
16 |
Correct |
24 ms |
35328 KB |
Output is correct |
17 |
Correct |
24 ms |
35280 KB |
Output is correct |
18 |
Correct |
24 ms |
35344 KB |
Output is correct |
19 |
Correct |
25 ms |
35240 KB |
Output is correct |
20 |
Correct |
25 ms |
35276 KB |
Output is correct |
21 |
Correct |
25 ms |
35276 KB |
Output is correct |
22 |
Correct |
25 ms |
35300 KB |
Output is correct |
23 |
Correct |
24 ms |
35252 KB |
Output is correct |
24 |
Correct |
25 ms |
35276 KB |
Output is correct |
25 |
Correct |
24 ms |
35300 KB |
Output is correct |
26 |
Correct |
23 ms |
35268 KB |
Output is correct |
27 |
Correct |
25 ms |
35340 KB |
Output is correct |
28 |
Correct |
24 ms |
35344 KB |
Output is correct |
29 |
Correct |
24 ms |
35248 KB |
Output is correct |
30 |
Correct |
24 ms |
35348 KB |
Output is correct |
31 |
Correct |
24 ms |
35276 KB |
Output is correct |
32 |
Correct |
26 ms |
35276 KB |
Output is correct |
33 |
Correct |
23 ms |
35276 KB |
Output is correct |
34 |
Correct |
24 ms |
35340 KB |
Output is correct |
35 |
Correct |
24 ms |
35352 KB |
Output is correct |
36 |
Correct |
24 ms |
35344 KB |
Output is correct |
37 |
Correct |
27 ms |
35228 KB |
Output is correct |
38 |
Correct |
24 ms |
35348 KB |
Output is correct |
39 |
Correct |
191 ms |
39900 KB |
Output is correct |
40 |
Correct |
156 ms |
40076 KB |
Output is correct |
41 |
Correct |
157 ms |
39860 KB |
Output is correct |
42 |
Correct |
200 ms |
39924 KB |
Output is correct |
43 |
Correct |
159 ms |
40084 KB |
Output is correct |
44 |
Correct |
148 ms |
40084 KB |
Output is correct |
45 |
Correct |
102 ms |
38160 KB |
Output is correct |
46 |
Correct |
100 ms |
38584 KB |
Output is correct |
47 |
Correct |
162 ms |
39884 KB |
Output is correct |
48 |
Correct |
150 ms |
39988 KB |
Output is correct |
49 |
Correct |
178 ms |
40044 KB |
Output is correct |
50 |
Correct |
188 ms |
40096 KB |
Output is correct |
51 |
Correct |
136 ms |
39252 KB |
Output is correct |
52 |
Correct |
175 ms |
39860 KB |
Output is correct |
53 |
Correct |
134 ms |
40004 KB |
Output is correct |
54 |
Correct |
141 ms |
40260 KB |
Output is correct |
55 |
Correct |
163 ms |
39244 KB |
Output is correct |
56 |
Correct |
130 ms |
38924 KB |
Output is correct |
57 |
Correct |
86 ms |
38024 KB |
Output is correct |
58 |
Correct |
110 ms |
38524 KB |
Output is correct |
59 |
Correct |
167 ms |
39720 KB |
Output is correct |
60 |
Correct |
154 ms |
39832 KB |
Output is correct |
61 |
Correct |
160 ms |
39888 KB |
Output is correct |
62 |
Correct |
161 ms |
39764 KB |
Output is correct |
63 |
Correct |
159 ms |
39820 KB |
Output is correct |
64 |
Correct |
153 ms |
39816 KB |
Output is correct |
65 |
Correct |
114 ms |
38652 KB |
Output is correct |
66 |
Correct |
143 ms |
39676 KB |
Output is correct |
67 |
Correct |
106 ms |
38504 KB |
Output is correct |
68 |
Correct |
126 ms |
39204 KB |
Output is correct |
69 |
Correct |
151 ms |
39940 KB |
Output is correct |
70 |
Correct |
149 ms |
39912 KB |
Output is correct |
71 |
Correct |
117 ms |
39180 KB |
Output is correct |
72 |
Correct |
142 ms |
40208 KB |
Output is correct |
73 |
Correct |
162 ms |
39756 KB |
Output is correct |
74 |
Correct |
182 ms |
40088 KB |
Output is correct |
75 |
Correct |
195 ms |
40136 KB |
Output is correct |
76 |
Correct |
127 ms |
38736 KB |
Output is correct |
77 |
Correct |
154 ms |
39492 KB |
Output is correct |
78 |
Correct |
197 ms |
40200 KB |
Output is correct |
79 |
Correct |
118 ms |
38420 KB |
Output is correct |
80 |
Correct |
118 ms |
38440 KB |
Output is correct |
81 |
Correct |
149 ms |
39312 KB |
Output is correct |
82 |
Correct |
122 ms |
38556 KB |
Output is correct |
83 |
Correct |
191 ms |
39724 KB |
Output is correct |
84 |
Correct |
164 ms |
39752 KB |
Output is correct |
85 |
Correct |
151 ms |
39852 KB |
Output is correct |
86 |
Correct |
173 ms |
40360 KB |
Output is correct |
87 |
Correct |
144 ms |
39836 KB |
Output is correct |
88 |
Correct |
171 ms |
40456 KB |
Output is correct |
89 |
Correct |
104 ms |
38600 KB |
Output is correct |
90 |
Correct |
160 ms |
40356 KB |
Output is correct |
91 |
Correct |
160 ms |
39460 KB |
Output is correct |
92 |
Correct |
122 ms |
39220 KB |
Output is correct |
93 |
Correct |
156 ms |
40308 KB |
Output is correct |
94 |
Correct |
157 ms |
40448 KB |
Output is correct |
95 |
Correct |
168 ms |
40212 KB |
Output is correct |
96 |
Correct |
167 ms |
40300 KB |
Output is correct |
97 |
Correct |
155 ms |
40368 KB |
Output is correct |
98 |
Correct |
135 ms |
39632 KB |
Output is correct |
99 |
Correct |
135 ms |
39208 KB |
Output is correct |
100 |
Correct |
128 ms |
39072 KB |
Output is correct |
101 |
Correct |
154 ms |
40336 KB |
Output is correct |
102 |
Correct |
130 ms |
40564 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
35268 KB |
Output is correct |
2 |
Correct |
25 ms |
35224 KB |
Output is correct |
3 |
Correct |
23 ms |
35216 KB |
Output is correct |
4 |
Correct |
28 ms |
35288 KB |
Output is correct |
5 |
Correct |
27 ms |
35276 KB |
Output is correct |
6 |
Correct |
24 ms |
35320 KB |
Output is correct |
7 |
Correct |
24 ms |
35348 KB |
Output is correct |
8 |
Correct |
26 ms |
35404 KB |
Output is correct |
9 |
Correct |
25 ms |
35336 KB |
Output is correct |
10 |
Correct |
24 ms |
35292 KB |
Output is correct |
11 |
Correct |
25 ms |
35276 KB |
Output is correct |
12 |
Correct |
24 ms |
35352 KB |
Output is correct |
13 |
Correct |
23 ms |
35232 KB |
Output is correct |
14 |
Correct |
23 ms |
35276 KB |
Output is correct |
15 |
Correct |
23 ms |
35220 KB |
Output is correct |
16 |
Correct |
24 ms |
35328 KB |
Output is correct |
17 |
Correct |
24 ms |
35280 KB |
Output is correct |
18 |
Correct |
24 ms |
35344 KB |
Output is correct |
19 |
Correct |
25 ms |
35240 KB |
Output is correct |
20 |
Correct |
25 ms |
35276 KB |
Output is correct |
21 |
Correct |
25 ms |
35276 KB |
Output is correct |
22 |
Correct |
25 ms |
35300 KB |
Output is correct |
23 |
Correct |
24 ms |
35252 KB |
Output is correct |
24 |
Correct |
25 ms |
35276 KB |
Output is correct |
25 |
Correct |
24 ms |
35300 KB |
Output is correct |
26 |
Correct |
23 ms |
35268 KB |
Output is correct |
27 |
Correct |
25 ms |
35340 KB |
Output is correct |
28 |
Correct |
24 ms |
35344 KB |
Output is correct |
29 |
Correct |
24 ms |
35248 KB |
Output is correct |
30 |
Correct |
24 ms |
35348 KB |
Output is correct |
31 |
Correct |
24 ms |
35276 KB |
Output is correct |
32 |
Correct |
26 ms |
35276 KB |
Output is correct |
33 |
Correct |
23 ms |
35276 KB |
Output is correct |
34 |
Correct |
24 ms |
35340 KB |
Output is correct |
35 |
Correct |
24 ms |
35352 KB |
Output is correct |
36 |
Correct |
24 ms |
35344 KB |
Output is correct |
37 |
Correct |
27 ms |
35228 KB |
Output is correct |
38 |
Correct |
24 ms |
35348 KB |
Output is correct |
39 |
Correct |
191 ms |
39900 KB |
Output is correct |
40 |
Correct |
156 ms |
40076 KB |
Output is correct |
41 |
Correct |
157 ms |
39860 KB |
Output is correct |
42 |
Correct |
200 ms |
39924 KB |
Output is correct |
43 |
Correct |
159 ms |
40084 KB |
Output is correct |
44 |
Correct |
148 ms |
40084 KB |
Output is correct |
45 |
Correct |
102 ms |
38160 KB |
Output is correct |
46 |
Correct |
100 ms |
38584 KB |
Output is correct |
47 |
Correct |
162 ms |
39884 KB |
Output is correct |
48 |
Correct |
150 ms |
39988 KB |
Output is correct |
49 |
Correct |
178 ms |
40044 KB |
Output is correct |
50 |
Correct |
188 ms |
40096 KB |
Output is correct |
51 |
Correct |
136 ms |
39252 KB |
Output is correct |
52 |
Correct |
175 ms |
39860 KB |
Output is correct |
53 |
Correct |
134 ms |
40004 KB |
Output is correct |
54 |
Correct |
141 ms |
40260 KB |
Output is correct |
55 |
Correct |
677 ms |
52980 KB |
Output is correct |
56 |
Correct |
503 ms |
49484 KB |
Output is correct |
57 |
Correct |
706 ms |
54616 KB |
Output is correct |
58 |
Correct |
488 ms |
49860 KB |
Output is correct |
59 |
Correct |
468 ms |
49860 KB |
Output is correct |
60 |
Correct |
660 ms |
55252 KB |
Output is correct |
61 |
Correct |
352 ms |
50016 KB |
Output is correct |
62 |
Correct |
407 ms |
49880 KB |
Output is correct |
63 |
Correct |
740 ms |
53768 KB |
Output is correct |
64 |
Correct |
740 ms |
53780 KB |
Output is correct |
65 |
Correct |
642 ms |
54536 KB |
Output is correct |
66 |
Correct |
649 ms |
55080 KB |
Output is correct |
67 |
Correct |
717 ms |
54608 KB |
Output is correct |
68 |
Correct |
679 ms |
55024 KB |
Output is correct |
69 |
Correct |
672 ms |
54884 KB |
Output is correct |
70 |
Correct |
718 ms |
54848 KB |
Output is correct |
71 |
Correct |
670 ms |
54960 KB |
Output is correct |
72 |
Correct |
656 ms |
54776 KB |
Output is correct |
73 |
Correct |
645 ms |
54924 KB |
Output is correct |
74 |
Correct |
662 ms |
54756 KB |
Output is correct |
75 |
Correct |
686 ms |
55016 KB |
Output is correct |
76 |
Correct |
712 ms |
54972 KB |
Output is correct |
77 |
Correct |
693 ms |
54880 KB |
Output is correct |
78 |
Correct |
677 ms |
54844 KB |
Output is correct |
79 |
Correct |
573 ms |
54056 KB |
Output is correct |
80 |
Correct |
634 ms |
54492 KB |
Output is correct |
81 |
Correct |
531 ms |
55440 KB |
Output is correct |
82 |
Correct |
163 ms |
39244 KB |
Output is correct |
83 |
Correct |
130 ms |
38924 KB |
Output is correct |
84 |
Correct |
86 ms |
38024 KB |
Output is correct |
85 |
Correct |
110 ms |
38524 KB |
Output is correct |
86 |
Correct |
167 ms |
39720 KB |
Output is correct |
87 |
Correct |
154 ms |
39832 KB |
Output is correct |
88 |
Correct |
160 ms |
39888 KB |
Output is correct |
89 |
Correct |
161 ms |
39764 KB |
Output is correct |
90 |
Correct |
159 ms |
39820 KB |
Output is correct |
91 |
Correct |
153 ms |
39816 KB |
Output is correct |
92 |
Correct |
114 ms |
38652 KB |
Output is correct |
93 |
Correct |
143 ms |
39676 KB |
Output is correct |
94 |
Correct |
106 ms |
38504 KB |
Output is correct |
95 |
Correct |
126 ms |
39204 KB |
Output is correct |
96 |
Correct |
151 ms |
39940 KB |
Output is correct |
97 |
Correct |
149 ms |
39912 KB |
Output is correct |
98 |
Correct |
117 ms |
39180 KB |
Output is correct |
99 |
Correct |
142 ms |
40208 KB |
Output is correct |
100 |
Correct |
162 ms |
39756 KB |
Output is correct |
101 |
Correct |
182 ms |
40088 KB |
Output is correct |
102 |
Correct |
195 ms |
40136 KB |
Output is correct |
103 |
Correct |
127 ms |
38736 KB |
Output is correct |
104 |
Correct |
154 ms |
39492 KB |
Output is correct |
105 |
Correct |
197 ms |
40200 KB |
Output is correct |
106 |
Correct |
118 ms |
38420 KB |
Output is correct |
107 |
Correct |
118 ms |
38440 KB |
Output is correct |
108 |
Correct |
149 ms |
39312 KB |
Output is correct |
109 |
Correct |
122 ms |
38556 KB |
Output is correct |
110 |
Correct |
191 ms |
39724 KB |
Output is correct |
111 |
Correct |
164 ms |
39752 KB |
Output is correct |
112 |
Correct |
151 ms |
39852 KB |
Output is correct |
113 |
Correct |
173 ms |
40360 KB |
Output is correct |
114 |
Correct |
144 ms |
39836 KB |
Output is correct |
115 |
Correct |
171 ms |
40456 KB |
Output is correct |
116 |
Correct |
104 ms |
38600 KB |
Output is correct |
117 |
Correct |
160 ms |
40356 KB |
Output is correct |
118 |
Correct |
160 ms |
39460 KB |
Output is correct |
119 |
Correct |
122 ms |
39220 KB |
Output is correct |
120 |
Correct |
156 ms |
40308 KB |
Output is correct |
121 |
Correct |
157 ms |
40448 KB |
Output is correct |
122 |
Correct |
168 ms |
40212 KB |
Output is correct |
123 |
Correct |
167 ms |
40300 KB |
Output is correct |
124 |
Correct |
155 ms |
40368 KB |
Output is correct |
125 |
Correct |
135 ms |
39632 KB |
Output is correct |
126 |
Correct |
135 ms |
39208 KB |
Output is correct |
127 |
Correct |
128 ms |
39072 KB |
Output is correct |
128 |
Correct |
154 ms |
40336 KB |
Output is correct |
129 |
Correct |
130 ms |
40564 KB |
Output is correct |
130 |
Correct |
728 ms |
55292 KB |
Output is correct |
131 |
Correct |
513 ms |
49860 KB |
Output is correct |
132 |
Correct |
700 ms |
55236 KB |
Output is correct |
133 |
Correct |
644 ms |
55032 KB |
Output is correct |
134 |
Correct |
563 ms |
52908 KB |
Output is correct |
135 |
Correct |
680 ms |
55972 KB |
Output is correct |
136 |
Correct |
748 ms |
54724 KB |
Output is correct |
137 |
Correct |
724 ms |
54712 KB |
Output is correct |
138 |
Correct |
673 ms |
55156 KB |
Output is correct |
139 |
Correct |
667 ms |
55676 KB |
Output is correct |
140 |
Correct |
688 ms |
55300 KB |
Output is correct |
141 |
Correct |
681 ms |
55532 KB |
Output is correct |
142 |
Correct |
699 ms |
55568 KB |
Output is correct |
143 |
Correct |
670 ms |
55512 KB |
Output is correct |
144 |
Correct |
666 ms |
55340 KB |
Output is correct |
145 |
Correct |
689 ms |
55616 KB |
Output is correct |
146 |
Correct |
663 ms |
55432 KB |
Output is correct |
147 |
Correct |
668 ms |
55492 KB |
Output is correct |
148 |
Correct |
674 ms |
55560 KB |
Output is correct |
149 |
Correct |
661 ms |
55620 KB |
Output is correct |
150 |
Correct |
431 ms |
50820 KB |
Output is correct |
151 |
Correct |
610 ms |
55048 KB |
Output is correct |
152 |
Correct |
594 ms |
55168 KB |
Output is correct |
153 |
Correct |
520 ms |
56348 KB |
Output is correct |