Submission #311790

# Submission time Handle Problem Language Result Execution time Memory
311790 2020-10-11T17:14:32 Z keta_tsimakuridze Interval Collection (CCO20_day2problem2) C++14
25 / 25
4668 ms 222824 KB
#include<bits/stdc++.h>
#define f first
#define s second
using namespace std;
const int N=1e6+5, Mx=1e9+5, Mn=-1e9+5;
int n,x,y;
multiset<int>l,r,Sl[N],Sr[N];
pair<pair<int,int>,int> tree[4*N];
char c;
void build(int u,int l,int r){
        tree[u].f.f=Mn;
		tree[u].f.s=Mx;
		tree[u].s=Mx-Mn;
	if(l==r) {
		return;
	}
	int mid=(l+r)/2;
	build(2*u,l,mid);
	build(2*u+1,mid+1,r);
}
void update(int u,int ind,int l,int r,int val,int type){
	// f.f - lefti
	if(l>ind || r<ind) return;
	if(l==r) {
		if(type==0){
			tree[u].f.s=val;
		}
		else tree[u].f.f=val;
		tree[u].s=tree[u].f.s-tree[u].f.f;
		return;
	}
	int mid=(l+r)/2;
	update(2*u,ind,l,mid,val,type);
	update(2*u+1,ind,mid+1,r,val,type);
	tree[u].f.f=max(tree[2*u].f.f,tree[2*u+1].f.f);
	tree[u].f.s=min(tree[2*u].f.s,tree[2*u+1].f.s);
	tree[u].s=min(tree[2*u].s,min(tree[2*u+1].s,tree[2*u+1].f.s-tree[2*u].f.f));
}
int main(){
	cin>>n;
	build(1,1,N);
	//cout<<"+"<<endl;
	for(int k=1;k<=n;k++){
		cin>>c>>x>>y;
		//cout<<c<<" "<<x<<" "<<y<<endl;
		if(c=='R'){
		l.erase(l.find(x));
		r.erase(r.find(y));
		Sr[x].erase(Sr[x].find(y));
		Sl[y].erase(Sl[y].find(x));
		if(Sr[x].size())
			update(1,x,1,N,*Sr[x].begin(),0);
		else update(1,x,1,N,Mx,0);
		
		if(Sl[y].size())
			update(1,y,1,N,*(--Sl[y].end()),1);
		else update(1,y,1,N,Mn,1);
		}
		else {
		l.insert(x);
		r.insert(y);
		Sr[x].insert(y);
		Sl[y].insert(x);
		update(1,x,1,N,*Sr[x].begin(),0);
		update(1,y,1,N,*(--Sl[y].end()),1);
		}
		if(*(--l.end())<=*r.begin()){
			cout<<*Sr[*(--l.end())].begin()-*(--Sl[*r.begin()].end())<<endl;
		}
		else cout<<tree[1].s<<endl;
		
	}
}
# Verdict Execution time Memory Grader output
1 Correct 86 ms 118920 KB Output is correct
2 Correct 86 ms 118904 KB Output is correct
3 Correct 86 ms 118904 KB Output is correct
4 Correct 87 ms 118904 KB Output is correct
5 Correct 86 ms 119032 KB Output is correct
6 Correct 86 ms 118904 KB Output is correct
7 Correct 86 ms 118904 KB Output is correct
8 Correct 86 ms 118904 KB Output is correct
9 Correct 88 ms 118904 KB Output is correct
10 Correct 88 ms 118904 KB Output is correct
11 Correct 86 ms 118904 KB Output is correct
12 Correct 87 ms 118908 KB Output is correct
13 Correct 87 ms 119032 KB Output is correct
14 Correct 90 ms 118904 KB Output is correct
15 Correct 89 ms 119032 KB Output is correct
16 Correct 89 ms 119032 KB Output is correct
17 Correct 86 ms 118904 KB Output is correct
18 Correct 86 ms 118908 KB Output is correct
19 Correct 85 ms 118904 KB Output is correct
20 Correct 87 ms 119032 KB Output is correct
21 Correct 87 ms 119032 KB Output is correct
22 Correct 85 ms 118960 KB Output is correct
23 Correct 85 ms 118904 KB Output is correct
24 Correct 86 ms 118908 KB Output is correct
25 Correct 88 ms 119036 KB Output is correct
26 Correct 86 ms 119032 KB Output is correct
27 Correct 88 ms 118904 KB Output is correct
28 Correct 86 ms 118904 KB Output is correct
29 Correct 88 ms 118904 KB Output is correct
30 Correct 87 ms 118904 KB Output is correct
31 Correct 86 ms 118904 KB Output is correct
32 Correct 86 ms 118904 KB Output is correct
33 Correct 86 ms 119028 KB Output is correct
34 Correct 86 ms 118904 KB Output is correct
35 Correct 87 ms 118904 KB Output is correct
36 Correct 85 ms 118904 KB Output is correct
37 Correct 84 ms 118904 KB Output is correct
38 Correct 88 ms 118904 KB Output is correct
39 Correct 86 ms 118876 KB Output is correct
40 Correct 87 ms 118904 KB Output is correct
41 Correct 87 ms 118904 KB Output is correct
42 Correct 88 ms 118940 KB Output is correct
43 Correct 84 ms 118904 KB Output is correct
44 Correct 86 ms 118904 KB Output is correct
45 Correct 86 ms 118904 KB Output is correct
46 Correct 86 ms 118904 KB Output is correct
47 Correct 86 ms 118904 KB Output is correct
48 Correct 85 ms 118904 KB Output is correct
49 Correct 86 ms 118904 KB Output is correct
50 Correct 86 ms 118976 KB Output is correct
51 Correct 86 ms 118904 KB Output is correct
52 Correct 85 ms 118904 KB Output is correct
53 Correct 86 ms 119032 KB Output is correct
54 Correct 86 ms 118904 KB Output is correct
55 Correct 85 ms 118904 KB Output is correct
56 Correct 87 ms 119104 KB Output is correct
57 Correct 85 ms 118904 KB Output is correct
58 Correct 86 ms 118904 KB Output is correct
59 Correct 87 ms 118904 KB Output is correct
60 Correct 85 ms 118908 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 86 ms 118920 KB Output is correct
2 Correct 86 ms 118904 KB Output is correct
3 Correct 86 ms 118904 KB Output is correct
4 Correct 87 ms 118904 KB Output is correct
5 Correct 86 ms 119032 KB Output is correct
6 Correct 86 ms 118904 KB Output is correct
7 Correct 86 ms 118904 KB Output is correct
8 Correct 86 ms 118904 KB Output is correct
9 Correct 88 ms 118904 KB Output is correct
10 Correct 88 ms 118904 KB Output is correct
11 Correct 86 ms 118904 KB Output is correct
12 Correct 87 ms 118908 KB Output is correct
13 Correct 87 ms 119032 KB Output is correct
14 Correct 90 ms 118904 KB Output is correct
15 Correct 89 ms 119032 KB Output is correct
16 Correct 89 ms 119032 KB Output is correct
17 Correct 86 ms 118904 KB Output is correct
18 Correct 86 ms 118908 KB Output is correct
19 Correct 85 ms 118904 KB Output is correct
20 Correct 87 ms 119032 KB Output is correct
21 Correct 87 ms 119032 KB Output is correct
22 Correct 85 ms 118960 KB Output is correct
23 Correct 85 ms 118904 KB Output is correct
24 Correct 86 ms 118908 KB Output is correct
25 Correct 88 ms 119036 KB Output is correct
26 Correct 86 ms 119032 KB Output is correct
27 Correct 88 ms 118904 KB Output is correct
28 Correct 86 ms 118904 KB Output is correct
29 Correct 88 ms 118904 KB Output is correct
30 Correct 87 ms 118904 KB Output is correct
31 Correct 86 ms 118904 KB Output is correct
32 Correct 86 ms 118904 KB Output is correct
33 Correct 86 ms 119028 KB Output is correct
34 Correct 86 ms 118904 KB Output is correct
35 Correct 87 ms 118904 KB Output is correct
36 Correct 85 ms 118904 KB Output is correct
37 Correct 84 ms 118904 KB Output is correct
38 Correct 88 ms 118904 KB Output is correct
39 Correct 86 ms 118876 KB Output is correct
40 Correct 87 ms 118904 KB Output is correct
41 Correct 87 ms 118904 KB Output is correct
42 Correct 88 ms 118940 KB Output is correct
43 Correct 84 ms 118904 KB Output is correct
44 Correct 86 ms 118904 KB Output is correct
45 Correct 86 ms 118904 KB Output is correct
46 Correct 86 ms 118904 KB Output is correct
47 Correct 86 ms 118904 KB Output is correct
48 Correct 85 ms 118904 KB Output is correct
49 Correct 86 ms 118904 KB Output is correct
50 Correct 86 ms 118976 KB Output is correct
51 Correct 86 ms 118904 KB Output is correct
52 Correct 85 ms 118904 KB Output is correct
53 Correct 86 ms 119032 KB Output is correct
54 Correct 86 ms 118904 KB Output is correct
55 Correct 85 ms 118904 KB Output is correct
56 Correct 87 ms 119104 KB Output is correct
57 Correct 85 ms 118904 KB Output is correct
58 Correct 86 ms 118904 KB Output is correct
59 Correct 87 ms 118904 KB Output is correct
60 Correct 85 ms 118908 KB Output is correct
61 Correct 85 ms 118904 KB Output is correct
62 Correct 83 ms 118904 KB Output is correct
63 Correct 84 ms 118904 KB Output is correct
64 Correct 162 ms 120312 KB Output is correct
65 Correct 159 ms 119416 KB Output is correct
66 Correct 147 ms 119160 KB Output is correct
67 Correct 146 ms 119160 KB Output is correct
68 Correct 162 ms 120316 KB Output is correct
69 Correct 159 ms 119416 KB Output is correct
70 Correct 149 ms 119160 KB Output is correct
71 Correct 148 ms 119160 KB Output is correct
72 Correct 165 ms 120952 KB Output is correct
73 Correct 164 ms 120568 KB Output is correct
74 Correct 162 ms 120568 KB Output is correct
75 Correct 162 ms 120440 KB Output is correct
76 Correct 163 ms 121336 KB Output is correct
77 Correct 163 ms 121336 KB Output is correct
78 Correct 164 ms 121336 KB Output is correct
79 Correct 167 ms 121468 KB Output is correct
80 Correct 158 ms 120184 KB Output is correct
81 Correct 151 ms 119416 KB Output is correct
82 Correct 152 ms 119160 KB Output is correct
83 Correct 145 ms 119252 KB Output is correct
84 Correct 160 ms 120312 KB Output is correct
85 Correct 154 ms 119416 KB Output is correct
86 Correct 151 ms 119160 KB Output is correct
87 Correct 148 ms 119160 KB Output is correct
88 Correct 164 ms 120952 KB Output is correct
89 Correct 164 ms 120696 KB Output is correct
90 Correct 159 ms 120440 KB Output is correct
91 Correct 163 ms 120424 KB Output is correct
92 Correct 164 ms 121336 KB Output is correct
93 Correct 166 ms 121520 KB Output is correct
94 Correct 164 ms 121336 KB Output is correct
95 Correct 165 ms 121336 KB Output is correct
96 Correct 146 ms 119160 KB Output is correct
97 Correct 145 ms 119160 KB Output is correct
98 Correct 146 ms 119160 KB Output is correct
99 Correct 148 ms 119160 KB Output is correct
100 Correct 148 ms 119164 KB Output is correct
101 Correct 145 ms 119160 KB Output is correct
102 Correct 149 ms 119288 KB Output is correct
103 Correct 144 ms 119196 KB Output is correct
104 Correct 158 ms 120440 KB Output is correct
105 Correct 154 ms 119404 KB Output is correct
106 Correct 151 ms 119416 KB Output is correct
107 Correct 149 ms 119160 KB Output is correct
108 Correct 163 ms 120312 KB Output is correct
109 Correct 159 ms 119544 KB Output is correct
110 Correct 148 ms 119208 KB Output is correct
111 Correct 146 ms 119160 KB Output is correct
112 Correct 149 ms 120268 KB Output is correct
113 Correct 153 ms 120312 KB Output is correct
114 Correct 144 ms 120312 KB Output is correct
115 Correct 150 ms 120240 KB Output is correct
116 Correct 148 ms 120292 KB Output is correct
117 Correct 152 ms 120312 KB Output is correct
118 Correct 148 ms 120316 KB Output is correct
119 Correct 149 ms 120440 KB Output is correct
120 Correct 145 ms 120308 KB Output is correct
121 Correct 149 ms 120312 KB Output is correct
122 Correct 152 ms 121444 KB Output is correct
123 Correct 148 ms 121336 KB Output is correct
124 Correct 140 ms 119416 KB Output is correct
125 Correct 137 ms 119160 KB Output is correct
126 Correct 134 ms 119248 KB Output is correct
127 Correct 142 ms 119624 KB Output is correct
128 Correct 137 ms 119132 KB Output is correct
129 Correct 138 ms 119288 KB Output is correct
130 Correct 141 ms 119700 KB Output is correct
131 Correct 136 ms 119160 KB Output is correct
132 Correct 133 ms 119160 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 86 ms 118920 KB Output is correct
2 Correct 86 ms 118904 KB Output is correct
3 Correct 86 ms 118904 KB Output is correct
4 Correct 87 ms 118904 KB Output is correct
5 Correct 86 ms 119032 KB Output is correct
6 Correct 86 ms 118904 KB Output is correct
7 Correct 86 ms 118904 KB Output is correct
8 Correct 86 ms 118904 KB Output is correct
9 Correct 88 ms 118904 KB Output is correct
10 Correct 88 ms 118904 KB Output is correct
11 Correct 86 ms 118904 KB Output is correct
12 Correct 87 ms 118908 KB Output is correct
13 Correct 87 ms 119032 KB Output is correct
14 Correct 90 ms 118904 KB Output is correct
15 Correct 89 ms 119032 KB Output is correct
16 Correct 89 ms 119032 KB Output is correct
17 Correct 86 ms 118904 KB Output is correct
18 Correct 86 ms 118908 KB Output is correct
19 Correct 85 ms 118904 KB Output is correct
20 Correct 87 ms 119032 KB Output is correct
21 Correct 87 ms 119032 KB Output is correct
22 Correct 85 ms 118960 KB Output is correct
23 Correct 85 ms 118904 KB Output is correct
24 Correct 86 ms 118908 KB Output is correct
25 Correct 88 ms 119036 KB Output is correct
26 Correct 86 ms 119032 KB Output is correct
27 Correct 88 ms 118904 KB Output is correct
28 Correct 86 ms 118904 KB Output is correct
29 Correct 88 ms 118904 KB Output is correct
30 Correct 87 ms 118904 KB Output is correct
31 Correct 86 ms 118904 KB Output is correct
32 Correct 86 ms 118904 KB Output is correct
33 Correct 86 ms 119028 KB Output is correct
34 Correct 86 ms 118904 KB Output is correct
35 Correct 87 ms 118904 KB Output is correct
36 Correct 85 ms 118904 KB Output is correct
37 Correct 84 ms 118904 KB Output is correct
38 Correct 88 ms 118904 KB Output is correct
39 Correct 86 ms 118876 KB Output is correct
40 Correct 87 ms 118904 KB Output is correct
41 Correct 87 ms 118904 KB Output is correct
42 Correct 88 ms 118940 KB Output is correct
43 Correct 84 ms 118904 KB Output is correct
44 Correct 86 ms 118904 KB Output is correct
45 Correct 86 ms 118904 KB Output is correct
46 Correct 86 ms 118904 KB Output is correct
47 Correct 86 ms 118904 KB Output is correct
48 Correct 85 ms 118904 KB Output is correct
49 Correct 86 ms 118904 KB Output is correct
50 Correct 86 ms 118976 KB Output is correct
51 Correct 86 ms 118904 KB Output is correct
52 Correct 85 ms 118904 KB Output is correct
53 Correct 86 ms 119032 KB Output is correct
54 Correct 86 ms 118904 KB Output is correct
55 Correct 85 ms 118904 KB Output is correct
56 Correct 87 ms 119104 KB Output is correct
57 Correct 85 ms 118904 KB Output is correct
58 Correct 86 ms 118904 KB Output is correct
59 Correct 87 ms 118904 KB Output is correct
60 Correct 85 ms 118908 KB Output is correct
61 Correct 85 ms 118904 KB Output is correct
62 Correct 83 ms 118904 KB Output is correct
63 Correct 84 ms 118904 KB Output is correct
64 Correct 162 ms 120312 KB Output is correct
65 Correct 159 ms 119416 KB Output is correct
66 Correct 147 ms 119160 KB Output is correct
67 Correct 146 ms 119160 KB Output is correct
68 Correct 162 ms 120316 KB Output is correct
69 Correct 159 ms 119416 KB Output is correct
70 Correct 149 ms 119160 KB Output is correct
71 Correct 148 ms 119160 KB Output is correct
72 Correct 165 ms 120952 KB Output is correct
73 Correct 164 ms 120568 KB Output is correct
74 Correct 162 ms 120568 KB Output is correct
75 Correct 162 ms 120440 KB Output is correct
76 Correct 163 ms 121336 KB Output is correct
77 Correct 163 ms 121336 KB Output is correct
78 Correct 164 ms 121336 KB Output is correct
79 Correct 167 ms 121468 KB Output is correct
80 Correct 158 ms 120184 KB Output is correct
81 Correct 151 ms 119416 KB Output is correct
82 Correct 152 ms 119160 KB Output is correct
83 Correct 145 ms 119252 KB Output is correct
84 Correct 160 ms 120312 KB Output is correct
85 Correct 154 ms 119416 KB Output is correct
86 Correct 151 ms 119160 KB Output is correct
87 Correct 148 ms 119160 KB Output is correct
88 Correct 164 ms 120952 KB Output is correct
89 Correct 164 ms 120696 KB Output is correct
90 Correct 159 ms 120440 KB Output is correct
91 Correct 163 ms 120424 KB Output is correct
92 Correct 164 ms 121336 KB Output is correct
93 Correct 166 ms 121520 KB Output is correct
94 Correct 164 ms 121336 KB Output is correct
95 Correct 165 ms 121336 KB Output is correct
96 Correct 146 ms 119160 KB Output is correct
97 Correct 145 ms 119160 KB Output is correct
98 Correct 146 ms 119160 KB Output is correct
99 Correct 148 ms 119160 KB Output is correct
100 Correct 148 ms 119164 KB Output is correct
101 Correct 145 ms 119160 KB Output is correct
102 Correct 149 ms 119288 KB Output is correct
103 Correct 144 ms 119196 KB Output is correct
104 Correct 158 ms 120440 KB Output is correct
105 Correct 154 ms 119404 KB Output is correct
106 Correct 151 ms 119416 KB Output is correct
107 Correct 149 ms 119160 KB Output is correct
108 Correct 163 ms 120312 KB Output is correct
109 Correct 159 ms 119544 KB Output is correct
110 Correct 148 ms 119208 KB Output is correct
111 Correct 146 ms 119160 KB Output is correct
112 Correct 149 ms 120268 KB Output is correct
113 Correct 153 ms 120312 KB Output is correct
114 Correct 144 ms 120312 KB Output is correct
115 Correct 150 ms 120240 KB Output is correct
116 Correct 148 ms 120292 KB Output is correct
117 Correct 152 ms 120312 KB Output is correct
118 Correct 148 ms 120316 KB Output is correct
119 Correct 149 ms 120440 KB Output is correct
120 Correct 145 ms 120308 KB Output is correct
121 Correct 149 ms 120312 KB Output is correct
122 Correct 152 ms 121444 KB Output is correct
123 Correct 148 ms 121336 KB Output is correct
124 Correct 140 ms 119416 KB Output is correct
125 Correct 137 ms 119160 KB Output is correct
126 Correct 134 ms 119248 KB Output is correct
127 Correct 142 ms 119624 KB Output is correct
128 Correct 137 ms 119132 KB Output is correct
129 Correct 138 ms 119288 KB Output is correct
130 Correct 141 ms 119700 KB Output is correct
131 Correct 136 ms 119160 KB Output is correct
132 Correct 133 ms 119160 KB Output is correct
133 Correct 441 ms 124664 KB Output is correct
134 Correct 396 ms 120828 KB Output is correct
135 Correct 376 ms 120184 KB Output is correct
136 Correct 341 ms 120056 KB Output is correct
137 Correct 453 ms 124672 KB Output is correct
138 Correct 408 ms 120952 KB Output is correct
139 Correct 377 ms 120184 KB Output is correct
140 Correct 367 ms 120056 KB Output is correct
141 Correct 470 ms 127480 KB Output is correct
142 Correct 447 ms 125944 KB Output is correct
143 Correct 441 ms 125688 KB Output is correct
144 Correct 446 ms 125504 KB Output is correct
145 Correct 466 ms 129272 KB Output is correct
146 Correct 473 ms 129256 KB Output is correct
147 Correct 489 ms 129400 KB Output is correct
148 Correct 467 ms 129656 KB Output is correct
149 Correct 440 ms 124720 KB Output is correct
150 Correct 401 ms 120952 KB Output is correct
151 Correct 370 ms 120056 KB Output is correct
152 Correct 346 ms 120056 KB Output is correct
153 Correct 441 ms 124536 KB Output is correct
154 Correct 402 ms 120952 KB Output is correct
155 Correct 374 ms 120108 KB Output is correct
156 Correct 362 ms 120056 KB Output is correct
157 Correct 474 ms 127480 KB Output is correct
158 Correct 441 ms 125816 KB Output is correct
159 Correct 446 ms 125688 KB Output is correct
160 Correct 437 ms 125564 KB Output is correct
161 Correct 476 ms 129400 KB Output is correct
162 Correct 471 ms 129272 KB Output is correct
163 Correct 462 ms 129272 KB Output is correct
164 Correct 463 ms 129400 KB Output is correct
165 Correct 340 ms 120040 KB Output is correct
166 Correct 340 ms 120056 KB Output is correct
167 Correct 343 ms 120056 KB Output is correct
168 Correct 340 ms 120056 KB Output is correct
169 Correct 355 ms 120056 KB Output is correct
170 Correct 359 ms 120184 KB Output is correct
171 Correct 348 ms 120056 KB Output is correct
172 Correct 347 ms 120152 KB Output is correct
173 Correct 432 ms 124732 KB Output is correct
174 Correct 390 ms 120824 KB Output is correct
175 Correct 368 ms 120056 KB Output is correct
176 Correct 340 ms 120056 KB Output is correct
177 Correct 435 ms 124668 KB Output is correct
178 Correct 391 ms 120824 KB Output is correct
179 Correct 382 ms 120184 KB Output is correct
180 Correct 341 ms 120056 KB Output is correct
181 Correct 357 ms 124792 KB Output is correct
182 Correct 386 ms 124792 KB Output is correct
183 Correct 343 ms 124664 KB Output is correct
184 Correct 376 ms 124720 KB Output is correct
185 Correct 353 ms 124664 KB Output is correct
186 Correct 379 ms 124664 KB Output is correct
187 Correct 338 ms 124792 KB Output is correct
188 Correct 367 ms 124664 KB Output is correct
189 Correct 357 ms 124668 KB Output is correct
190 Correct 383 ms 124664 KB Output is correct
191 Correct 356 ms 129172 KB Output is correct
192 Correct 360 ms 129272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1164 ms 160124 KB Output is correct
2 Correct 1173 ms 160164 KB Output is correct
3 Correct 2199 ms 201080 KB Output is correct
4 Correct 2235 ms 201212 KB Output is correct
5 Correct 2782 ms 221640 KB Output is correct
6 Correct 2817 ms 221596 KB Output is correct
7 Correct 2813 ms 129612 KB Output is correct
8 Correct 2463 ms 126788 KB Output is correct
9 Correct 2409 ms 126592 KB Output is correct
10 Correct 2911 ms 132764 KB Output is correct
11 Correct 2489 ms 126828 KB Output is correct
12 Correct 2423 ms 126496 KB Output is correct
13 Correct 3012 ms 134492 KB Output is correct
14 Correct 2485 ms 126796 KB Output is correct
15 Correct 2439 ms 126400 KB Output is correct
16 Correct 2440 ms 127500 KB Output is correct
17 Correct 2448 ms 127464 KB Output is correct
18 Correct 2454 ms 127572 KB Output is correct
19 Correct 2457 ms 127480 KB Output is correct
20 Correct 2462 ms 127548 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 86 ms 118920 KB Output is correct
2 Correct 86 ms 118904 KB Output is correct
3 Correct 86 ms 118904 KB Output is correct
4 Correct 87 ms 118904 KB Output is correct
5 Correct 86 ms 119032 KB Output is correct
6 Correct 86 ms 118904 KB Output is correct
7 Correct 86 ms 118904 KB Output is correct
8 Correct 86 ms 118904 KB Output is correct
9 Correct 88 ms 118904 KB Output is correct
10 Correct 88 ms 118904 KB Output is correct
11 Correct 86 ms 118904 KB Output is correct
12 Correct 87 ms 118908 KB Output is correct
13 Correct 87 ms 119032 KB Output is correct
14 Correct 90 ms 118904 KB Output is correct
15 Correct 89 ms 119032 KB Output is correct
16 Correct 89 ms 119032 KB Output is correct
17 Correct 86 ms 118904 KB Output is correct
18 Correct 86 ms 118908 KB Output is correct
19 Correct 85 ms 118904 KB Output is correct
20 Correct 87 ms 119032 KB Output is correct
21 Correct 87 ms 119032 KB Output is correct
22 Correct 85 ms 118960 KB Output is correct
23 Correct 85 ms 118904 KB Output is correct
24 Correct 86 ms 118908 KB Output is correct
25 Correct 88 ms 119036 KB Output is correct
26 Correct 86 ms 119032 KB Output is correct
27 Correct 88 ms 118904 KB Output is correct
28 Correct 86 ms 118904 KB Output is correct
29 Correct 88 ms 118904 KB Output is correct
30 Correct 87 ms 118904 KB Output is correct
31 Correct 86 ms 118904 KB Output is correct
32 Correct 86 ms 118904 KB Output is correct
33 Correct 86 ms 119028 KB Output is correct
34 Correct 86 ms 118904 KB Output is correct
35 Correct 87 ms 118904 KB Output is correct
36 Correct 85 ms 118904 KB Output is correct
37 Correct 84 ms 118904 KB Output is correct
38 Correct 88 ms 118904 KB Output is correct
39 Correct 86 ms 118876 KB Output is correct
40 Correct 87 ms 118904 KB Output is correct
41 Correct 87 ms 118904 KB Output is correct
42 Correct 88 ms 118940 KB Output is correct
43 Correct 84 ms 118904 KB Output is correct
44 Correct 86 ms 118904 KB Output is correct
45 Correct 86 ms 118904 KB Output is correct
46 Correct 86 ms 118904 KB Output is correct
47 Correct 86 ms 118904 KB Output is correct
48 Correct 85 ms 118904 KB Output is correct
49 Correct 86 ms 118904 KB Output is correct
50 Correct 86 ms 118976 KB Output is correct
51 Correct 86 ms 118904 KB Output is correct
52 Correct 85 ms 118904 KB Output is correct
53 Correct 86 ms 119032 KB Output is correct
54 Correct 86 ms 118904 KB Output is correct
55 Correct 85 ms 118904 KB Output is correct
56 Correct 87 ms 119104 KB Output is correct
57 Correct 85 ms 118904 KB Output is correct
58 Correct 86 ms 118904 KB Output is correct
59 Correct 87 ms 118904 KB Output is correct
60 Correct 85 ms 118908 KB Output is correct
61 Correct 85 ms 118904 KB Output is correct
62 Correct 83 ms 118904 KB Output is correct
63 Correct 84 ms 118904 KB Output is correct
64 Correct 162 ms 120312 KB Output is correct
65 Correct 159 ms 119416 KB Output is correct
66 Correct 147 ms 119160 KB Output is correct
67 Correct 146 ms 119160 KB Output is correct
68 Correct 162 ms 120316 KB Output is correct
69 Correct 159 ms 119416 KB Output is correct
70 Correct 149 ms 119160 KB Output is correct
71 Correct 148 ms 119160 KB Output is correct
72 Correct 165 ms 120952 KB Output is correct
73 Correct 164 ms 120568 KB Output is correct
74 Correct 162 ms 120568 KB Output is correct
75 Correct 162 ms 120440 KB Output is correct
76 Correct 163 ms 121336 KB Output is correct
77 Correct 163 ms 121336 KB Output is correct
78 Correct 164 ms 121336 KB Output is correct
79 Correct 167 ms 121468 KB Output is correct
80 Correct 158 ms 120184 KB Output is correct
81 Correct 151 ms 119416 KB Output is correct
82 Correct 152 ms 119160 KB Output is correct
83 Correct 145 ms 119252 KB Output is correct
84 Correct 160 ms 120312 KB Output is correct
85 Correct 154 ms 119416 KB Output is correct
86 Correct 151 ms 119160 KB Output is correct
87 Correct 148 ms 119160 KB Output is correct
88 Correct 164 ms 120952 KB Output is correct
89 Correct 164 ms 120696 KB Output is correct
90 Correct 159 ms 120440 KB Output is correct
91 Correct 163 ms 120424 KB Output is correct
92 Correct 164 ms 121336 KB Output is correct
93 Correct 166 ms 121520 KB Output is correct
94 Correct 164 ms 121336 KB Output is correct
95 Correct 165 ms 121336 KB Output is correct
96 Correct 146 ms 119160 KB Output is correct
97 Correct 145 ms 119160 KB Output is correct
98 Correct 146 ms 119160 KB Output is correct
99 Correct 148 ms 119160 KB Output is correct
100 Correct 148 ms 119164 KB Output is correct
101 Correct 145 ms 119160 KB Output is correct
102 Correct 149 ms 119288 KB Output is correct
103 Correct 144 ms 119196 KB Output is correct
104 Correct 158 ms 120440 KB Output is correct
105 Correct 154 ms 119404 KB Output is correct
106 Correct 151 ms 119416 KB Output is correct
107 Correct 149 ms 119160 KB Output is correct
108 Correct 163 ms 120312 KB Output is correct
109 Correct 159 ms 119544 KB Output is correct
110 Correct 148 ms 119208 KB Output is correct
111 Correct 146 ms 119160 KB Output is correct
112 Correct 149 ms 120268 KB Output is correct
113 Correct 153 ms 120312 KB Output is correct
114 Correct 144 ms 120312 KB Output is correct
115 Correct 150 ms 120240 KB Output is correct
116 Correct 148 ms 120292 KB Output is correct
117 Correct 152 ms 120312 KB Output is correct
118 Correct 148 ms 120316 KB Output is correct
119 Correct 149 ms 120440 KB Output is correct
120 Correct 145 ms 120308 KB Output is correct
121 Correct 149 ms 120312 KB Output is correct
122 Correct 152 ms 121444 KB Output is correct
123 Correct 148 ms 121336 KB Output is correct
124 Correct 140 ms 119416 KB Output is correct
125 Correct 137 ms 119160 KB Output is correct
126 Correct 134 ms 119248 KB Output is correct
127 Correct 142 ms 119624 KB Output is correct
128 Correct 137 ms 119132 KB Output is correct
129 Correct 138 ms 119288 KB Output is correct
130 Correct 141 ms 119700 KB Output is correct
131 Correct 136 ms 119160 KB Output is correct
132 Correct 133 ms 119160 KB Output is correct
133 Correct 441 ms 124664 KB Output is correct
134 Correct 396 ms 120828 KB Output is correct
135 Correct 376 ms 120184 KB Output is correct
136 Correct 341 ms 120056 KB Output is correct
137 Correct 453 ms 124672 KB Output is correct
138 Correct 408 ms 120952 KB Output is correct
139 Correct 377 ms 120184 KB Output is correct
140 Correct 367 ms 120056 KB Output is correct
141 Correct 470 ms 127480 KB Output is correct
142 Correct 447 ms 125944 KB Output is correct
143 Correct 441 ms 125688 KB Output is correct
144 Correct 446 ms 125504 KB Output is correct
145 Correct 466 ms 129272 KB Output is correct
146 Correct 473 ms 129256 KB Output is correct
147 Correct 489 ms 129400 KB Output is correct
148 Correct 467 ms 129656 KB Output is correct
149 Correct 440 ms 124720 KB Output is correct
150 Correct 401 ms 120952 KB Output is correct
151 Correct 370 ms 120056 KB Output is correct
152 Correct 346 ms 120056 KB Output is correct
153 Correct 441 ms 124536 KB Output is correct
154 Correct 402 ms 120952 KB Output is correct
155 Correct 374 ms 120108 KB Output is correct
156 Correct 362 ms 120056 KB Output is correct
157 Correct 474 ms 127480 KB Output is correct
158 Correct 441 ms 125816 KB Output is correct
159 Correct 446 ms 125688 KB Output is correct
160 Correct 437 ms 125564 KB Output is correct
161 Correct 476 ms 129400 KB Output is correct
162 Correct 471 ms 129272 KB Output is correct
163 Correct 462 ms 129272 KB Output is correct
164 Correct 463 ms 129400 KB Output is correct
165 Correct 340 ms 120040 KB Output is correct
166 Correct 340 ms 120056 KB Output is correct
167 Correct 343 ms 120056 KB Output is correct
168 Correct 340 ms 120056 KB Output is correct
169 Correct 355 ms 120056 KB Output is correct
170 Correct 359 ms 120184 KB Output is correct
171 Correct 348 ms 120056 KB Output is correct
172 Correct 347 ms 120152 KB Output is correct
173 Correct 432 ms 124732 KB Output is correct
174 Correct 390 ms 120824 KB Output is correct
175 Correct 368 ms 120056 KB Output is correct
176 Correct 340 ms 120056 KB Output is correct
177 Correct 435 ms 124668 KB Output is correct
178 Correct 391 ms 120824 KB Output is correct
179 Correct 382 ms 120184 KB Output is correct
180 Correct 341 ms 120056 KB Output is correct
181 Correct 357 ms 124792 KB Output is correct
182 Correct 386 ms 124792 KB Output is correct
183 Correct 343 ms 124664 KB Output is correct
184 Correct 376 ms 124720 KB Output is correct
185 Correct 353 ms 124664 KB Output is correct
186 Correct 379 ms 124664 KB Output is correct
187 Correct 338 ms 124792 KB Output is correct
188 Correct 367 ms 124664 KB Output is correct
189 Correct 357 ms 124668 KB Output is correct
190 Correct 383 ms 124664 KB Output is correct
191 Correct 356 ms 129172 KB Output is correct
192 Correct 360 ms 129272 KB Output is correct
193 Correct 1164 ms 160124 KB Output is correct
194 Correct 1173 ms 160164 KB Output is correct
195 Correct 2199 ms 201080 KB Output is correct
196 Correct 2235 ms 201212 KB Output is correct
197 Correct 2782 ms 221640 KB Output is correct
198 Correct 2817 ms 221596 KB Output is correct
199 Correct 2813 ms 129612 KB Output is correct
200 Correct 2463 ms 126788 KB Output is correct
201 Correct 2409 ms 126592 KB Output is correct
202 Correct 2911 ms 132764 KB Output is correct
203 Correct 2489 ms 126828 KB Output is correct
204 Correct 2423 ms 126496 KB Output is correct
205 Correct 3012 ms 134492 KB Output is correct
206 Correct 2485 ms 126796 KB Output is correct
207 Correct 2439 ms 126400 KB Output is correct
208 Correct 2440 ms 127500 KB Output is correct
209 Correct 2448 ms 127464 KB Output is correct
210 Correct 2454 ms 127572 KB Output is correct
211 Correct 2457 ms 127480 KB Output is correct
212 Correct 2462 ms 127548 KB Output is correct
213 Correct 4443 ms 175716 KB Output is correct
214 Correct 4022 ms 138268 KB Output is correct
215 Correct 3325 ms 130432 KB Output is correct
216 Correct 2792 ms 130040 KB Output is correct
217 Correct 4447 ms 175656 KB Output is correct
218 Correct 3998 ms 138776 KB Output is correct
219 Correct 3336 ms 130520 KB Output is correct
220 Correct 2885 ms 129912 KB Output is correct
221 Correct 4575 ms 204064 KB Output is correct
222 Correct 4501 ms 188904 KB Output is correct
223 Correct 4446 ms 185432 KB Output is correct
224 Correct 4496 ms 184964 KB Output is correct
225 Correct 4624 ms 222672 KB Output is correct
226 Correct 4614 ms 222824 KB Output is correct
227 Correct 4636 ms 222740 KB Output is correct
228 Correct 4626 ms 222584 KB Output is correct
229 Correct 4451 ms 175368 KB Output is correct
230 Correct 3971 ms 137820 KB Output is correct
231 Correct 3289 ms 130232 KB Output is correct
232 Correct 2751 ms 129736 KB Output is correct
233 Correct 4461 ms 175480 KB Output is correct
234 Correct 4037 ms 138064 KB Output is correct
235 Correct 3292 ms 130352 KB Output is correct
236 Correct 2881 ms 129684 KB Output is correct
237 Correct 4549 ms 203708 KB Output is correct
238 Correct 4409 ms 188560 KB Output is correct
239 Correct 4409 ms 185436 KB Output is correct
240 Correct 4441 ms 184936 KB Output is correct
241 Correct 4668 ms 222484 KB Output is correct
242 Correct 4623 ms 222328 KB Output is correct
243 Correct 4600 ms 222380 KB Output is correct
244 Correct 4601 ms 222032 KB Output is correct
245 Correct 2626 ms 130040 KB Output is correct
246 Correct 2648 ms 129928 KB Output is correct
247 Correct 2652 ms 130048 KB Output is correct
248 Correct 2637 ms 130040 KB Output is correct
249 Correct 2830 ms 129936 KB Output is correct
250 Correct 2869 ms 130168 KB Output is correct
251 Correct 2879 ms 129860 KB Output is correct
252 Correct 2727 ms 130376 KB Output is correct
253 Correct 4286 ms 175740 KB Output is correct
254 Correct 3810 ms 138272 KB Output is correct
255 Correct 3182 ms 130616 KB Output is correct
256 Correct 2748 ms 130288 KB Output is correct
257 Correct 4234 ms 175772 KB Output is correct
258 Correct 3803 ms 138312 KB Output is correct
259 Correct 3244 ms 130932 KB Output is correct
260 Correct 2748 ms 130128 KB Output is correct
261 Correct 3032 ms 177016 KB Output is correct
262 Correct 3619 ms 177116 KB Output is correct
263 Correct 2516 ms 176120 KB Output is correct
264 Correct 3027 ms 176144 KB Output is correct
265 Correct 3052 ms 177208 KB Output is correct
266 Correct 3612 ms 177184 KB Output is correct
267 Correct 2509 ms 175992 KB Output is correct
268 Correct 3035 ms 176008 KB Output is correct
269 Correct 2729 ms 221852 KB Output is correct
270 Correct 2802 ms 221568 KB Output is correct
271 Correct 2833 ms 130396 KB Output is correct
272 Correct 2478 ms 126936 KB Output is correct
273 Correct 2991 ms 133992 KB Output is correct
274 Correct 2494 ms 126844 KB Output is correct
275 Correct 2533 ms 175424 KB Output is correct