Submission #310849

# Submission time Handle Problem Language Result Execution time Memory
310849 2020-10-08T07:06:59 Z mosiashvililuka Interval Collection (CCO20_day2problem2) C++17
25 / 25
4245 ms 329724 KB
#include<bits/stdc++.h>
using namespace std;
const int N=2200009;
int a,b,c,d,e,i,j,ii,jj,zx,xc,tes,t,za,seg[N],seg2[N],seg3[N];
char ch;
multiset <int> lf[N],rg[N],mn,mx;
void up(int q){
	if(q==0) return;
	if(seg[q*2]==-1||seg[q*2+1]==-1){
		seg[q]=max(seg[q*2],seg[q*2+1]);
	}else{
		seg[q]=min(seg[q*2],seg[q*2+1]);
	}
	seg2[q]=max(seg2[q*2],seg2[q*2+1]);
	if(seg3[q*2]==-1||seg3[q*2+1]==-1){
		seg3[q]=max(seg3[q*2],seg3[q*2+1]);
	}else{
		seg3[q]=min(seg3[q*2],seg3[q*2+1]);
	}
	int qw=seg3[q*2+1]-seg2[q*2];
	if(seg3[q*2+1]!=-1&&seg2[q*2]!=-1){
		if(seg[q]>qw||seg[q]==-1) seg[q]=qw;
	}
	up(q/2);
}
void upd(int q){
	multiset <int>::iterator it,tt,zit,ztt;
	if(lf[q].size()==0||rg[q].size()==0){
		seg[q+za-1]=-1;
	}else{
		it=lf[q].end();it--;
		tt=rg[q].begin();
		seg[q+za-1]=(*tt)-(*it);
	}
	if(lf[q].size()==0){
		seg2[q+za-1]=-1;
	}else{
		it=lf[q].end();it--;
		seg2[q+za-1]=(*it);
	}
	if(rg[q].size()==0){
		seg3[q+za-1]=-1;
	}else{
		it=rg[q].begin();
		seg3[q+za-1]=(*it);
	}
	up((q+za-1)/2);
}
int main(){
	ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
	cin>>tes;
	za=1;
	while(za<1000000) za*=2;
	for(i=1; i<=za*2; i++){
		seg[i]=-1;
		seg2[i]=seg3[i]=-1;
	}
	for(t=1; t<=tes; t++){
		cin>>ch>>c>>d;
		if(ch=='A'){
			lf[d].insert(c);
			rg[c].insert(d);
			mn.insert(d);
			mx.insert(c);
		}else{
			lf[d].erase(lf[d].lower_bound(c));
			rg[c].erase(rg[c].lower_bound(d));
			mn.erase(mn.lower_bound(d));
			mx.erase(mx.lower_bound(c));
		}
		upd(c);
		upd(d);
		multiset <int>::iterator it,tt,zit,ztt;
		it=mn.begin();
		tt=mx.end();tt--;
		if((*tt)<(*it)){
			c=(*tt);d=(*it);
			zit=lf[d].end();zit--;
			ztt=rg[c].begin();
			cout<<(*ztt)-(*zit)<<endl;
		}else{
			cout<<seg[1]<<endl;
		}
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 153 ms 231672 KB Output is correct
2 Correct 154 ms 231672 KB Output is correct
3 Correct 156 ms 231672 KB Output is correct
4 Correct 162 ms 231672 KB Output is correct
5 Correct 151 ms 231672 KB Output is correct
6 Correct 151 ms 231672 KB Output is correct
7 Correct 158 ms 231672 KB Output is correct
8 Correct 149 ms 231672 KB Output is correct
9 Correct 150 ms 231672 KB Output is correct
10 Correct 149 ms 231672 KB Output is correct
11 Correct 153 ms 231672 KB Output is correct
12 Correct 162 ms 231672 KB Output is correct
13 Correct 157 ms 231800 KB Output is correct
14 Correct 150 ms 231672 KB Output is correct
15 Correct 151 ms 231672 KB Output is correct
16 Correct 151 ms 231672 KB Output is correct
17 Correct 150 ms 231672 KB Output is correct
18 Correct 154 ms 231672 KB Output is correct
19 Correct 156 ms 231672 KB Output is correct
20 Correct 150 ms 231672 KB Output is correct
21 Correct 151 ms 231672 KB Output is correct
22 Correct 151 ms 231672 KB Output is correct
23 Correct 151 ms 231800 KB Output is correct
24 Correct 154 ms 231672 KB Output is correct
25 Correct 155 ms 231672 KB Output is correct
26 Correct 163 ms 231800 KB Output is correct
27 Correct 152 ms 231672 KB Output is correct
28 Correct 150 ms 231672 KB Output is correct
29 Correct 152 ms 231676 KB Output is correct
30 Correct 164 ms 231672 KB Output is correct
31 Correct 153 ms 231672 KB Output is correct
32 Correct 154 ms 231672 KB Output is correct
33 Correct 152 ms 231672 KB Output is correct
34 Correct 153 ms 231672 KB Output is correct
35 Correct 150 ms 231672 KB Output is correct
36 Correct 152 ms 231672 KB Output is correct
37 Correct 152 ms 231672 KB Output is correct
38 Correct 168 ms 231676 KB Output is correct
39 Correct 152 ms 231672 KB Output is correct
40 Correct 154 ms 231672 KB Output is correct
41 Correct 155 ms 231672 KB Output is correct
42 Correct 155 ms 231672 KB Output is correct
43 Correct 165 ms 231672 KB Output is correct
44 Correct 152 ms 231672 KB Output is correct
45 Correct 155 ms 231672 KB Output is correct
46 Correct 153 ms 231672 KB Output is correct
47 Correct 155 ms 231672 KB Output is correct
48 Correct 165 ms 231672 KB Output is correct
49 Correct 153 ms 231672 KB Output is correct
50 Correct 153 ms 231800 KB Output is correct
51 Correct 154 ms 231672 KB Output is correct
52 Correct 158 ms 231672 KB Output is correct
53 Correct 153 ms 231672 KB Output is correct
54 Correct 152 ms 231672 KB Output is correct
55 Correct 154 ms 231672 KB Output is correct
56 Correct 164 ms 231672 KB Output is correct
57 Correct 152 ms 231672 KB Output is correct
58 Correct 152 ms 231672 KB Output is correct
59 Correct 145 ms 231728 KB Output is correct
60 Correct 149 ms 231800 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 153 ms 231672 KB Output is correct
2 Correct 154 ms 231672 KB Output is correct
3 Correct 156 ms 231672 KB Output is correct
4 Correct 162 ms 231672 KB Output is correct
5 Correct 151 ms 231672 KB Output is correct
6 Correct 151 ms 231672 KB Output is correct
7 Correct 158 ms 231672 KB Output is correct
8 Correct 149 ms 231672 KB Output is correct
9 Correct 150 ms 231672 KB Output is correct
10 Correct 149 ms 231672 KB Output is correct
11 Correct 153 ms 231672 KB Output is correct
12 Correct 162 ms 231672 KB Output is correct
13 Correct 157 ms 231800 KB Output is correct
14 Correct 150 ms 231672 KB Output is correct
15 Correct 151 ms 231672 KB Output is correct
16 Correct 151 ms 231672 KB Output is correct
17 Correct 150 ms 231672 KB Output is correct
18 Correct 154 ms 231672 KB Output is correct
19 Correct 156 ms 231672 KB Output is correct
20 Correct 150 ms 231672 KB Output is correct
21 Correct 151 ms 231672 KB Output is correct
22 Correct 151 ms 231672 KB Output is correct
23 Correct 151 ms 231800 KB Output is correct
24 Correct 154 ms 231672 KB Output is correct
25 Correct 155 ms 231672 KB Output is correct
26 Correct 163 ms 231800 KB Output is correct
27 Correct 152 ms 231672 KB Output is correct
28 Correct 150 ms 231672 KB Output is correct
29 Correct 152 ms 231676 KB Output is correct
30 Correct 164 ms 231672 KB Output is correct
31 Correct 153 ms 231672 KB Output is correct
32 Correct 154 ms 231672 KB Output is correct
33 Correct 152 ms 231672 KB Output is correct
34 Correct 153 ms 231672 KB Output is correct
35 Correct 150 ms 231672 KB Output is correct
36 Correct 152 ms 231672 KB Output is correct
37 Correct 152 ms 231672 KB Output is correct
38 Correct 168 ms 231676 KB Output is correct
39 Correct 152 ms 231672 KB Output is correct
40 Correct 154 ms 231672 KB Output is correct
41 Correct 155 ms 231672 KB Output is correct
42 Correct 155 ms 231672 KB Output is correct
43 Correct 165 ms 231672 KB Output is correct
44 Correct 152 ms 231672 KB Output is correct
45 Correct 155 ms 231672 KB Output is correct
46 Correct 153 ms 231672 KB Output is correct
47 Correct 155 ms 231672 KB Output is correct
48 Correct 165 ms 231672 KB Output is correct
49 Correct 153 ms 231672 KB Output is correct
50 Correct 153 ms 231800 KB Output is correct
51 Correct 154 ms 231672 KB Output is correct
52 Correct 158 ms 231672 KB Output is correct
53 Correct 153 ms 231672 KB Output is correct
54 Correct 152 ms 231672 KB Output is correct
55 Correct 154 ms 231672 KB Output is correct
56 Correct 164 ms 231672 KB Output is correct
57 Correct 152 ms 231672 KB Output is correct
58 Correct 152 ms 231672 KB Output is correct
59 Correct 145 ms 231728 KB Output is correct
60 Correct 149 ms 231800 KB Output is correct
61 Correct 152 ms 231672 KB Output is correct
62 Correct 147 ms 231672 KB Output is correct
63 Correct 158 ms 231732 KB Output is correct
64 Correct 212 ms 232952 KB Output is correct
65 Correct 213 ms 232056 KB Output is correct
66 Correct 208 ms 231928 KB Output is correct
67 Correct 198 ms 231932 KB Output is correct
68 Correct 214 ms 232952 KB Output is correct
69 Correct 209 ms 232188 KB Output is correct
70 Correct 209 ms 231928 KB Output is correct
71 Correct 200 ms 231928 KB Output is correct
72 Correct 218 ms 233720 KB Output is correct
73 Correct 216 ms 233304 KB Output is correct
74 Correct 213 ms 233296 KB Output is correct
75 Correct 220 ms 233208 KB Output is correct
76 Correct 221 ms 234104 KB Output is correct
77 Correct 216 ms 234140 KB Output is correct
78 Correct 219 ms 234104 KB Output is correct
79 Correct 218 ms 234232 KB Output is correct
80 Correct 217 ms 232952 KB Output is correct
81 Correct 219 ms 232196 KB Output is correct
82 Correct 214 ms 231928 KB Output is correct
83 Correct 197 ms 231928 KB Output is correct
84 Correct 217 ms 232952 KB Output is correct
85 Correct 211 ms 232440 KB Output is correct
86 Correct 201 ms 231928 KB Output is correct
87 Correct 201 ms 232060 KB Output is correct
88 Correct 237 ms 233848 KB Output is correct
89 Correct 230 ms 233336 KB Output is correct
90 Correct 229 ms 233208 KB Output is correct
91 Correct 209 ms 233208 KB Output is correct
92 Correct 217 ms 234104 KB Output is correct
93 Correct 227 ms 234104 KB Output is correct
94 Correct 219 ms 234104 KB Output is correct
95 Correct 218 ms 234232 KB Output is correct
96 Correct 230 ms 231928 KB Output is correct
97 Correct 205 ms 231928 KB Output is correct
98 Correct 205 ms 231952 KB Output is correct
99 Correct 201 ms 231996 KB Output is correct
100 Correct 207 ms 231928 KB Output is correct
101 Correct 273 ms 231884 KB Output is correct
102 Correct 202 ms 231928 KB Output is correct
103 Correct 201 ms 231928 KB Output is correct
104 Correct 215 ms 233080 KB Output is correct
105 Correct 207 ms 232056 KB Output is correct
106 Correct 204 ms 232184 KB Output is correct
107 Correct 213 ms 231928 KB Output is correct
108 Correct 216 ms 232952 KB Output is correct
109 Correct 209 ms 232176 KB Output is correct
110 Correct 205 ms 231928 KB Output is correct
111 Correct 196 ms 231928 KB Output is correct
112 Correct 197 ms 233080 KB Output is correct
113 Correct 202 ms 232956 KB Output is correct
114 Correct 204 ms 232952 KB Output is correct
115 Correct 203 ms 232952 KB Output is correct
116 Correct 198 ms 232956 KB Output is correct
117 Correct 200 ms 232952 KB Output is correct
118 Correct 194 ms 232952 KB Output is correct
119 Correct 206 ms 232952 KB Output is correct
120 Correct 196 ms 232952 KB Output is correct
121 Correct 201 ms 232952 KB Output is correct
122 Correct 205 ms 234104 KB Output is correct
123 Correct 203 ms 234104 KB Output is correct
124 Correct 194 ms 232184 KB Output is correct
125 Correct 192 ms 231928 KB Output is correct
126 Correct 190 ms 231928 KB Output is correct
127 Correct 189 ms 232312 KB Output is correct
128 Correct 195 ms 231928 KB Output is correct
129 Correct 202 ms 231924 KB Output is correct
130 Correct 202 ms 232440 KB Output is correct
131 Correct 192 ms 231928 KB Output is correct
132 Correct 190 ms 231932 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 153 ms 231672 KB Output is correct
2 Correct 154 ms 231672 KB Output is correct
3 Correct 156 ms 231672 KB Output is correct
4 Correct 162 ms 231672 KB Output is correct
5 Correct 151 ms 231672 KB Output is correct
6 Correct 151 ms 231672 KB Output is correct
7 Correct 158 ms 231672 KB Output is correct
8 Correct 149 ms 231672 KB Output is correct
9 Correct 150 ms 231672 KB Output is correct
10 Correct 149 ms 231672 KB Output is correct
11 Correct 153 ms 231672 KB Output is correct
12 Correct 162 ms 231672 KB Output is correct
13 Correct 157 ms 231800 KB Output is correct
14 Correct 150 ms 231672 KB Output is correct
15 Correct 151 ms 231672 KB Output is correct
16 Correct 151 ms 231672 KB Output is correct
17 Correct 150 ms 231672 KB Output is correct
18 Correct 154 ms 231672 KB Output is correct
19 Correct 156 ms 231672 KB Output is correct
20 Correct 150 ms 231672 KB Output is correct
21 Correct 151 ms 231672 KB Output is correct
22 Correct 151 ms 231672 KB Output is correct
23 Correct 151 ms 231800 KB Output is correct
24 Correct 154 ms 231672 KB Output is correct
25 Correct 155 ms 231672 KB Output is correct
26 Correct 163 ms 231800 KB Output is correct
27 Correct 152 ms 231672 KB Output is correct
28 Correct 150 ms 231672 KB Output is correct
29 Correct 152 ms 231676 KB Output is correct
30 Correct 164 ms 231672 KB Output is correct
31 Correct 153 ms 231672 KB Output is correct
32 Correct 154 ms 231672 KB Output is correct
33 Correct 152 ms 231672 KB Output is correct
34 Correct 153 ms 231672 KB Output is correct
35 Correct 150 ms 231672 KB Output is correct
36 Correct 152 ms 231672 KB Output is correct
37 Correct 152 ms 231672 KB Output is correct
38 Correct 168 ms 231676 KB Output is correct
39 Correct 152 ms 231672 KB Output is correct
40 Correct 154 ms 231672 KB Output is correct
41 Correct 155 ms 231672 KB Output is correct
42 Correct 155 ms 231672 KB Output is correct
43 Correct 165 ms 231672 KB Output is correct
44 Correct 152 ms 231672 KB Output is correct
45 Correct 155 ms 231672 KB Output is correct
46 Correct 153 ms 231672 KB Output is correct
47 Correct 155 ms 231672 KB Output is correct
48 Correct 165 ms 231672 KB Output is correct
49 Correct 153 ms 231672 KB Output is correct
50 Correct 153 ms 231800 KB Output is correct
51 Correct 154 ms 231672 KB Output is correct
52 Correct 158 ms 231672 KB Output is correct
53 Correct 153 ms 231672 KB Output is correct
54 Correct 152 ms 231672 KB Output is correct
55 Correct 154 ms 231672 KB Output is correct
56 Correct 164 ms 231672 KB Output is correct
57 Correct 152 ms 231672 KB Output is correct
58 Correct 152 ms 231672 KB Output is correct
59 Correct 145 ms 231728 KB Output is correct
60 Correct 149 ms 231800 KB Output is correct
61 Correct 152 ms 231672 KB Output is correct
62 Correct 147 ms 231672 KB Output is correct
63 Correct 158 ms 231732 KB Output is correct
64 Correct 212 ms 232952 KB Output is correct
65 Correct 213 ms 232056 KB Output is correct
66 Correct 208 ms 231928 KB Output is correct
67 Correct 198 ms 231932 KB Output is correct
68 Correct 214 ms 232952 KB Output is correct
69 Correct 209 ms 232188 KB Output is correct
70 Correct 209 ms 231928 KB Output is correct
71 Correct 200 ms 231928 KB Output is correct
72 Correct 218 ms 233720 KB Output is correct
73 Correct 216 ms 233304 KB Output is correct
74 Correct 213 ms 233296 KB Output is correct
75 Correct 220 ms 233208 KB Output is correct
76 Correct 221 ms 234104 KB Output is correct
77 Correct 216 ms 234140 KB Output is correct
78 Correct 219 ms 234104 KB Output is correct
79 Correct 218 ms 234232 KB Output is correct
80 Correct 217 ms 232952 KB Output is correct
81 Correct 219 ms 232196 KB Output is correct
82 Correct 214 ms 231928 KB Output is correct
83 Correct 197 ms 231928 KB Output is correct
84 Correct 217 ms 232952 KB Output is correct
85 Correct 211 ms 232440 KB Output is correct
86 Correct 201 ms 231928 KB Output is correct
87 Correct 201 ms 232060 KB Output is correct
88 Correct 237 ms 233848 KB Output is correct
89 Correct 230 ms 233336 KB Output is correct
90 Correct 229 ms 233208 KB Output is correct
91 Correct 209 ms 233208 KB Output is correct
92 Correct 217 ms 234104 KB Output is correct
93 Correct 227 ms 234104 KB Output is correct
94 Correct 219 ms 234104 KB Output is correct
95 Correct 218 ms 234232 KB Output is correct
96 Correct 230 ms 231928 KB Output is correct
97 Correct 205 ms 231928 KB Output is correct
98 Correct 205 ms 231952 KB Output is correct
99 Correct 201 ms 231996 KB Output is correct
100 Correct 207 ms 231928 KB Output is correct
101 Correct 273 ms 231884 KB Output is correct
102 Correct 202 ms 231928 KB Output is correct
103 Correct 201 ms 231928 KB Output is correct
104 Correct 215 ms 233080 KB Output is correct
105 Correct 207 ms 232056 KB Output is correct
106 Correct 204 ms 232184 KB Output is correct
107 Correct 213 ms 231928 KB Output is correct
108 Correct 216 ms 232952 KB Output is correct
109 Correct 209 ms 232176 KB Output is correct
110 Correct 205 ms 231928 KB Output is correct
111 Correct 196 ms 231928 KB Output is correct
112 Correct 197 ms 233080 KB Output is correct
113 Correct 202 ms 232956 KB Output is correct
114 Correct 204 ms 232952 KB Output is correct
115 Correct 203 ms 232952 KB Output is correct
116 Correct 198 ms 232956 KB Output is correct
117 Correct 200 ms 232952 KB Output is correct
118 Correct 194 ms 232952 KB Output is correct
119 Correct 206 ms 232952 KB Output is correct
120 Correct 196 ms 232952 KB Output is correct
121 Correct 201 ms 232952 KB Output is correct
122 Correct 205 ms 234104 KB Output is correct
123 Correct 203 ms 234104 KB Output is correct
124 Correct 194 ms 232184 KB Output is correct
125 Correct 192 ms 231928 KB Output is correct
126 Correct 190 ms 231928 KB Output is correct
127 Correct 189 ms 232312 KB Output is correct
128 Correct 195 ms 231928 KB Output is correct
129 Correct 202 ms 231924 KB Output is correct
130 Correct 202 ms 232440 KB Output is correct
131 Correct 192 ms 231928 KB Output is correct
132 Correct 190 ms 231932 KB Output is correct
133 Correct 473 ms 237304 KB Output is correct
134 Correct 395 ms 233636 KB Output is correct
135 Correct 395 ms 232824 KB Output is correct
136 Correct 350 ms 232696 KB Output is correct
137 Correct 464 ms 237304 KB Output is correct
138 Correct 415 ms 233592 KB Output is correct
139 Correct 399 ms 232952 KB Output is correct
140 Correct 377 ms 232696 KB Output is correct
141 Correct 475 ms 240120 KB Output is correct
142 Correct 456 ms 238584 KB Output is correct
143 Correct 469 ms 238328 KB Output is correct
144 Correct 484 ms 238328 KB Output is correct
145 Correct 497 ms 242168 KB Output is correct
146 Correct 490 ms 242040 KB Output is correct
147 Correct 485 ms 242040 KB Output is correct
148 Correct 489 ms 242040 KB Output is correct
149 Correct 454 ms 237308 KB Output is correct
150 Correct 407 ms 233592 KB Output is correct
151 Correct 382 ms 232824 KB Output is correct
152 Correct 356 ms 232824 KB Output is correct
153 Correct 449 ms 237304 KB Output is correct
154 Correct 409 ms 233592 KB Output is correct
155 Correct 377 ms 232824 KB Output is correct
156 Correct 394 ms 232808 KB Output is correct
157 Correct 469 ms 240124 KB Output is correct
158 Correct 450 ms 238712 KB Output is correct
159 Correct 439 ms 238328 KB Output is correct
160 Correct 441 ms 238200 KB Output is correct
161 Correct 470 ms 242040 KB Output is correct
162 Correct 464 ms 242040 KB Output is correct
163 Correct 475 ms 242168 KB Output is correct
164 Correct 465 ms 242040 KB Output is correct
165 Correct 330 ms 232696 KB Output is correct
166 Correct 336 ms 232824 KB Output is correct
167 Correct 341 ms 232696 KB Output is correct
168 Correct 335 ms 232696 KB Output is correct
169 Correct 362 ms 232828 KB Output is correct
170 Correct 350 ms 232824 KB Output is correct
171 Correct 353 ms 232824 KB Output is correct
172 Correct 336 ms 232696 KB Output is correct
173 Correct 442 ms 237564 KB Output is correct
174 Correct 392 ms 233592 KB Output is correct
175 Correct 364 ms 232824 KB Output is correct
176 Correct 336 ms 232696 KB Output is correct
177 Correct 427 ms 237352 KB Output is correct
178 Correct 389 ms 233592 KB Output is correct
179 Correct 380 ms 232824 KB Output is correct
180 Correct 348 ms 232800 KB Output is correct
181 Correct 346 ms 237436 KB Output is correct
182 Correct 376 ms 237432 KB Output is correct
183 Correct 341 ms 237432 KB Output is correct
184 Correct 358 ms 237484 KB Output is correct
185 Correct 363 ms 237432 KB Output is correct
186 Correct 374 ms 237660 KB Output is correct
187 Correct 348 ms 237432 KB Output is correct
188 Correct 366 ms 237432 KB Output is correct
189 Correct 356 ms 237432 KB Output is correct
190 Correct 372 ms 237400 KB Output is correct
191 Correct 347 ms 242040 KB Output is correct
192 Correct 356 ms 242004 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 945 ms 272504 KB Output is correct
2 Correct 957 ms 272548 KB Output is correct
3 Correct 1722 ms 310580 KB Output is correct
4 Correct 1763 ms 310640 KB Output is correct
5 Correct 2123 ms 329460 KB Output is correct
6 Correct 2172 ms 329584 KB Output is correct
7 Correct 2177 ms 238456 KB Output is correct
8 Correct 1870 ms 236024 KB Output is correct
9 Correct 1851 ms 235876 KB Output is correct
10 Correct 2331 ms 241316 KB Output is correct
11 Correct 1879 ms 236280 KB Output is correct
12 Correct 1847 ms 235768 KB Output is correct
13 Correct 2352 ms 242476 KB Output is correct
14 Correct 1868 ms 236152 KB Output is correct
15 Correct 1850 ms 235768 KB Output is correct
16 Correct 1892 ms 235896 KB Output is correct
17 Correct 1864 ms 236024 KB Output is correct
18 Correct 1892 ms 235768 KB Output is correct
19 Correct 1910 ms 235768 KB Output is correct
20 Correct 1942 ms 235768 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 153 ms 231672 KB Output is correct
2 Correct 154 ms 231672 KB Output is correct
3 Correct 156 ms 231672 KB Output is correct
4 Correct 162 ms 231672 KB Output is correct
5 Correct 151 ms 231672 KB Output is correct
6 Correct 151 ms 231672 KB Output is correct
7 Correct 158 ms 231672 KB Output is correct
8 Correct 149 ms 231672 KB Output is correct
9 Correct 150 ms 231672 KB Output is correct
10 Correct 149 ms 231672 KB Output is correct
11 Correct 153 ms 231672 KB Output is correct
12 Correct 162 ms 231672 KB Output is correct
13 Correct 157 ms 231800 KB Output is correct
14 Correct 150 ms 231672 KB Output is correct
15 Correct 151 ms 231672 KB Output is correct
16 Correct 151 ms 231672 KB Output is correct
17 Correct 150 ms 231672 KB Output is correct
18 Correct 154 ms 231672 KB Output is correct
19 Correct 156 ms 231672 KB Output is correct
20 Correct 150 ms 231672 KB Output is correct
21 Correct 151 ms 231672 KB Output is correct
22 Correct 151 ms 231672 KB Output is correct
23 Correct 151 ms 231800 KB Output is correct
24 Correct 154 ms 231672 KB Output is correct
25 Correct 155 ms 231672 KB Output is correct
26 Correct 163 ms 231800 KB Output is correct
27 Correct 152 ms 231672 KB Output is correct
28 Correct 150 ms 231672 KB Output is correct
29 Correct 152 ms 231676 KB Output is correct
30 Correct 164 ms 231672 KB Output is correct
31 Correct 153 ms 231672 KB Output is correct
32 Correct 154 ms 231672 KB Output is correct
33 Correct 152 ms 231672 KB Output is correct
34 Correct 153 ms 231672 KB Output is correct
35 Correct 150 ms 231672 KB Output is correct
36 Correct 152 ms 231672 KB Output is correct
37 Correct 152 ms 231672 KB Output is correct
38 Correct 168 ms 231676 KB Output is correct
39 Correct 152 ms 231672 KB Output is correct
40 Correct 154 ms 231672 KB Output is correct
41 Correct 155 ms 231672 KB Output is correct
42 Correct 155 ms 231672 KB Output is correct
43 Correct 165 ms 231672 KB Output is correct
44 Correct 152 ms 231672 KB Output is correct
45 Correct 155 ms 231672 KB Output is correct
46 Correct 153 ms 231672 KB Output is correct
47 Correct 155 ms 231672 KB Output is correct
48 Correct 165 ms 231672 KB Output is correct
49 Correct 153 ms 231672 KB Output is correct
50 Correct 153 ms 231800 KB Output is correct
51 Correct 154 ms 231672 KB Output is correct
52 Correct 158 ms 231672 KB Output is correct
53 Correct 153 ms 231672 KB Output is correct
54 Correct 152 ms 231672 KB Output is correct
55 Correct 154 ms 231672 KB Output is correct
56 Correct 164 ms 231672 KB Output is correct
57 Correct 152 ms 231672 KB Output is correct
58 Correct 152 ms 231672 KB Output is correct
59 Correct 145 ms 231728 KB Output is correct
60 Correct 149 ms 231800 KB Output is correct
61 Correct 152 ms 231672 KB Output is correct
62 Correct 147 ms 231672 KB Output is correct
63 Correct 158 ms 231732 KB Output is correct
64 Correct 212 ms 232952 KB Output is correct
65 Correct 213 ms 232056 KB Output is correct
66 Correct 208 ms 231928 KB Output is correct
67 Correct 198 ms 231932 KB Output is correct
68 Correct 214 ms 232952 KB Output is correct
69 Correct 209 ms 232188 KB Output is correct
70 Correct 209 ms 231928 KB Output is correct
71 Correct 200 ms 231928 KB Output is correct
72 Correct 218 ms 233720 KB Output is correct
73 Correct 216 ms 233304 KB Output is correct
74 Correct 213 ms 233296 KB Output is correct
75 Correct 220 ms 233208 KB Output is correct
76 Correct 221 ms 234104 KB Output is correct
77 Correct 216 ms 234140 KB Output is correct
78 Correct 219 ms 234104 KB Output is correct
79 Correct 218 ms 234232 KB Output is correct
80 Correct 217 ms 232952 KB Output is correct
81 Correct 219 ms 232196 KB Output is correct
82 Correct 214 ms 231928 KB Output is correct
83 Correct 197 ms 231928 KB Output is correct
84 Correct 217 ms 232952 KB Output is correct
85 Correct 211 ms 232440 KB Output is correct
86 Correct 201 ms 231928 KB Output is correct
87 Correct 201 ms 232060 KB Output is correct
88 Correct 237 ms 233848 KB Output is correct
89 Correct 230 ms 233336 KB Output is correct
90 Correct 229 ms 233208 KB Output is correct
91 Correct 209 ms 233208 KB Output is correct
92 Correct 217 ms 234104 KB Output is correct
93 Correct 227 ms 234104 KB Output is correct
94 Correct 219 ms 234104 KB Output is correct
95 Correct 218 ms 234232 KB Output is correct
96 Correct 230 ms 231928 KB Output is correct
97 Correct 205 ms 231928 KB Output is correct
98 Correct 205 ms 231952 KB Output is correct
99 Correct 201 ms 231996 KB Output is correct
100 Correct 207 ms 231928 KB Output is correct
101 Correct 273 ms 231884 KB Output is correct
102 Correct 202 ms 231928 KB Output is correct
103 Correct 201 ms 231928 KB Output is correct
104 Correct 215 ms 233080 KB Output is correct
105 Correct 207 ms 232056 KB Output is correct
106 Correct 204 ms 232184 KB Output is correct
107 Correct 213 ms 231928 KB Output is correct
108 Correct 216 ms 232952 KB Output is correct
109 Correct 209 ms 232176 KB Output is correct
110 Correct 205 ms 231928 KB Output is correct
111 Correct 196 ms 231928 KB Output is correct
112 Correct 197 ms 233080 KB Output is correct
113 Correct 202 ms 232956 KB Output is correct
114 Correct 204 ms 232952 KB Output is correct
115 Correct 203 ms 232952 KB Output is correct
116 Correct 198 ms 232956 KB Output is correct
117 Correct 200 ms 232952 KB Output is correct
118 Correct 194 ms 232952 KB Output is correct
119 Correct 206 ms 232952 KB Output is correct
120 Correct 196 ms 232952 KB Output is correct
121 Correct 201 ms 232952 KB Output is correct
122 Correct 205 ms 234104 KB Output is correct
123 Correct 203 ms 234104 KB Output is correct
124 Correct 194 ms 232184 KB Output is correct
125 Correct 192 ms 231928 KB Output is correct
126 Correct 190 ms 231928 KB Output is correct
127 Correct 189 ms 232312 KB Output is correct
128 Correct 195 ms 231928 KB Output is correct
129 Correct 202 ms 231924 KB Output is correct
130 Correct 202 ms 232440 KB Output is correct
131 Correct 192 ms 231928 KB Output is correct
132 Correct 190 ms 231932 KB Output is correct
133 Correct 473 ms 237304 KB Output is correct
134 Correct 395 ms 233636 KB Output is correct
135 Correct 395 ms 232824 KB Output is correct
136 Correct 350 ms 232696 KB Output is correct
137 Correct 464 ms 237304 KB Output is correct
138 Correct 415 ms 233592 KB Output is correct
139 Correct 399 ms 232952 KB Output is correct
140 Correct 377 ms 232696 KB Output is correct
141 Correct 475 ms 240120 KB Output is correct
142 Correct 456 ms 238584 KB Output is correct
143 Correct 469 ms 238328 KB Output is correct
144 Correct 484 ms 238328 KB Output is correct
145 Correct 497 ms 242168 KB Output is correct
146 Correct 490 ms 242040 KB Output is correct
147 Correct 485 ms 242040 KB Output is correct
148 Correct 489 ms 242040 KB Output is correct
149 Correct 454 ms 237308 KB Output is correct
150 Correct 407 ms 233592 KB Output is correct
151 Correct 382 ms 232824 KB Output is correct
152 Correct 356 ms 232824 KB Output is correct
153 Correct 449 ms 237304 KB Output is correct
154 Correct 409 ms 233592 KB Output is correct
155 Correct 377 ms 232824 KB Output is correct
156 Correct 394 ms 232808 KB Output is correct
157 Correct 469 ms 240124 KB Output is correct
158 Correct 450 ms 238712 KB Output is correct
159 Correct 439 ms 238328 KB Output is correct
160 Correct 441 ms 238200 KB Output is correct
161 Correct 470 ms 242040 KB Output is correct
162 Correct 464 ms 242040 KB Output is correct
163 Correct 475 ms 242168 KB Output is correct
164 Correct 465 ms 242040 KB Output is correct
165 Correct 330 ms 232696 KB Output is correct
166 Correct 336 ms 232824 KB Output is correct
167 Correct 341 ms 232696 KB Output is correct
168 Correct 335 ms 232696 KB Output is correct
169 Correct 362 ms 232828 KB Output is correct
170 Correct 350 ms 232824 KB Output is correct
171 Correct 353 ms 232824 KB Output is correct
172 Correct 336 ms 232696 KB Output is correct
173 Correct 442 ms 237564 KB Output is correct
174 Correct 392 ms 233592 KB Output is correct
175 Correct 364 ms 232824 KB Output is correct
176 Correct 336 ms 232696 KB Output is correct
177 Correct 427 ms 237352 KB Output is correct
178 Correct 389 ms 233592 KB Output is correct
179 Correct 380 ms 232824 KB Output is correct
180 Correct 348 ms 232800 KB Output is correct
181 Correct 346 ms 237436 KB Output is correct
182 Correct 376 ms 237432 KB Output is correct
183 Correct 341 ms 237432 KB Output is correct
184 Correct 358 ms 237484 KB Output is correct
185 Correct 363 ms 237432 KB Output is correct
186 Correct 374 ms 237660 KB Output is correct
187 Correct 348 ms 237432 KB Output is correct
188 Correct 366 ms 237432 KB Output is correct
189 Correct 356 ms 237432 KB Output is correct
190 Correct 372 ms 237400 KB Output is correct
191 Correct 347 ms 242040 KB Output is correct
192 Correct 356 ms 242004 KB Output is correct
193 Correct 945 ms 272504 KB Output is correct
194 Correct 957 ms 272548 KB Output is correct
195 Correct 1722 ms 310580 KB Output is correct
196 Correct 1763 ms 310640 KB Output is correct
197 Correct 2123 ms 329460 KB Output is correct
198 Correct 2172 ms 329584 KB Output is correct
199 Correct 2177 ms 238456 KB Output is correct
200 Correct 1870 ms 236024 KB Output is correct
201 Correct 1851 ms 235876 KB Output is correct
202 Correct 2331 ms 241316 KB Output is correct
203 Correct 1879 ms 236280 KB Output is correct
204 Correct 1847 ms 235768 KB Output is correct
205 Correct 2352 ms 242476 KB Output is correct
206 Correct 1868 ms 236152 KB Output is correct
207 Correct 1850 ms 235768 KB Output is correct
208 Correct 1892 ms 235896 KB Output is correct
209 Correct 1864 ms 236024 KB Output is correct
210 Correct 1892 ms 235768 KB Output is correct
211 Correct 1910 ms 235768 KB Output is correct
212 Correct 1942 ms 235768 KB Output is correct
213 Correct 3882 ms 282872 KB Output is correct
214 Correct 3380 ms 245624 KB Output is correct
215 Correct 2688 ms 237688 KB Output is correct
216 Correct 2156 ms 237220 KB Output is correct
217 Correct 3896 ms 283000 KB Output is correct
218 Correct 3519 ms 245752 KB Output is correct
219 Correct 2770 ms 238048 KB Output is correct
220 Correct 2330 ms 236936 KB Output is correct
221 Correct 4215 ms 310904 KB Output is correct
222 Correct 4090 ms 295928 KB Output is correct
223 Correct 4050 ms 292472 KB Output is correct
224 Correct 3980 ms 292124 KB Output is correct
225 Correct 4204 ms 329596 KB Output is correct
226 Correct 4184 ms 329464 KB Output is correct
227 Correct 4164 ms 329464 KB Output is correct
228 Correct 4194 ms 329464 KB Output is correct
229 Correct 3968 ms 282360 KB Output is correct
230 Correct 3453 ms 244856 KB Output is correct
231 Correct 2747 ms 237176 KB Output is correct
232 Correct 2150 ms 236664 KB Output is correct
233 Correct 3980 ms 282488 KB Output is correct
234 Correct 3460 ms 245060 KB Output is correct
235 Correct 2763 ms 237616 KB Output is correct
236 Correct 2312 ms 236684 KB Output is correct
237 Correct 4245 ms 310648 KB Output is correct
238 Correct 4006 ms 295924 KB Output is correct
239 Correct 3986 ms 292604 KB Output is correct
240 Correct 3947 ms 291868 KB Output is correct
241 Correct 4220 ms 329724 KB Output is correct
242 Correct 4172 ms 329232 KB Output is correct
243 Correct 4172 ms 329448 KB Output is correct
244 Correct 4191 ms 329104 KB Output is correct
245 Correct 2003 ms 237048 KB Output is correct
246 Correct 1986 ms 236964 KB Output is correct
247 Correct 2005 ms 237040 KB Output is correct
248 Correct 1980 ms 236888 KB Output is correct
249 Correct 2244 ms 236808 KB Output is correct
250 Correct 2280 ms 236664 KB Output is correct
251 Correct 2346 ms 236536 KB Output is correct
252 Correct 2110 ms 237176 KB Output is correct
253 Correct 3909 ms 282408 KB Output is correct
254 Correct 3302 ms 244984 KB Output is correct
255 Correct 2704 ms 236368 KB Output is correct
256 Correct 2178 ms 235896 KB Output is correct
257 Correct 3760 ms 281496 KB Output is correct
258 Correct 3264 ms 243984 KB Output is correct
259 Correct 2654 ms 236416 KB Output is correct
260 Correct 2150 ms 235560 KB Output is correct
261 Correct 2474 ms 282708 KB Output is correct
262 Correct 3001 ms 282800 KB Output is correct
263 Correct 2031 ms 282680 KB Output is correct
264 Correct 2612 ms 282584 KB Output is correct
265 Correct 2531 ms 282464 KB Output is correct
266 Correct 3109 ms 282560 KB Output is correct
267 Correct 2011 ms 282476 KB Output is correct
268 Correct 2584 ms 282384 KB Output is correct
269 Correct 2160 ms 326712 KB Output is correct
270 Correct 2175 ms 326720 KB Output is correct
271 Correct 2266 ms 236704 KB Output is correct
272 Correct 1924 ms 233752 KB Output is correct
273 Correct 2479 ms 240068 KB Output is correct
274 Correct 1941 ms 233772 KB Output is correct
275 Correct 1986 ms 282360 KB Output is correct